ID tokens
ID tokens are JSON web tokens (JWTs) meant for use by the application only. For example, if there’s an app that uses Google to log in users and to sync their calendars, Google sends an ID token to the app that includes information about the user. The app then parses the token’s contents and uses the information (including details like name and profile picture) to customize the user experience.Be sure to validate ID tokens before using the information it contains. You can use a library to help with this task.
Access tokens
Access tokens (which aren’t always ) are used to inform an API that the bearer of the token has been authorized to access the API and perform a predetermined set of actions (specified by the scopes granted). In the Google example above, Google sends an access token to the app after the user logs in and provides consent for the app to read or write to their Google Calendar. Whenever the app wants to write to Google Calendar, it sends a request to the Google Calendar API, including the access token in the HTTP Authorization header. Access tokens must never be used for authentication. Access tokens cannot tell if the user has authenticated. The only user information the access token possesses is the user ID, located in the sub claim. In your applications, treat access tokens as opaque strings since they are meant for APIs. Your application should not attempt to decode them or expect to receive tokens in a particular format. Here is an example of an access token:Specialized tokens
There are three specialized tokens used in Auth0’s token-based authentication scenarios:- : A token used to obtain a renewed access token without having to re-authenticate the user.
- access tokens: Access tokens issued by identity providers after user authentication that you can use to call the third-party APIs.
- Auth0 access tokens: Short-lived tokens containing specific claims (scopes) that allow you to call Management API endpoints.