Identity Verification Workflow
This workflow may be used by clients to get the iRacing customer identifier of the authenticated user. Previously, clients might have used private messages on the iRacing forums or other means to accomplish this goal.
Goals
- Obtain the iRacing customer identifier or display name for a user.
Prerequisites and Assumptions
- The client has been registered.
- No refresh tokens will be issued and the access token will be used only once so there is no need to store it.
- The user has created an account within the client and has authenticated within the client.
Steps
- The client starts an Authentication and Authorization
flow by invoking /authorize. The client should
request the scope
iracing.profileto get access to the iRacing profile and specify the correctredirect_uriregistered to the client. - The user is asked to login and is told that the client has requested access
to their profile information. It is assumed the user will approve. The
browser is redirected to the
redirect_uriwith acode. - The client receives the
codeat itsredirect_uri. It may then use /token to trade thecodefor an access token. - Using the access token, the client makes a request to /iracing/profile. The profile information is returned as a JSON object in the response, including the customer identifier and display name.
- The client discards the access token.