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.profile
to get access to the iRacing profile and specify the correctredirect_uri
registered 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_uri
with acode
. - The client receives the
code
at itsredirect_uri
. It may then use /token to trade thecode
for 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.