exp
claim, as well as security measures, like signatures. Typically, a user needs a new access token when gaining access to a resource for the first time, or after the previous access token granted to them expires.
An is a credential artifact that OAuth can use to get a new access token without user interaction. This allows the to shorten the access token lifetime for security purposes without involving the user when the access token expires. You can request new access tokens until the refresh token is on the DenyList.
It is important to keep the number of refresh tokens within a reasonable manageable limit to make sure that it’s easy to maintain those credentials safely and securely. Applications must store refresh tokens securely because they essentially allow a user to remain authenticated forever.
Offline access
If you want to allow users to get refresh tokens while offline, you can select the Allow Offline Access switch in API Settings.
Limitations
Auth0 limits the amount of active refresh tokens to 200 tokens per user per application. This limit only applies to active tokens. If the limit is reached and a new refresh token is created, the system revokes and deletes the oldest token for that user and application. Revoked tokens and expired tokens do not count against the limit. To review our recommendations and best practices to avoid excess tokens, read Token Best Practices.Enable OIDC Flag
The refresh token behavior is applicable to OIDC-conformant applications. You can configure an application to be OIDC-conformant in one of the following ways:- Enabling the OIDC Conformant flag for an app.
- Passing an
audience
claim to the/authorize
endpoint of the Authentication API.
SDK support
For web apps
Auth0 SDKs support refresh tokens including:- Node.js
- ASP.NET Core
- PHP
- Java