Call the API
To exchange the refresh token you received during authentication for a new access token, call the Auth0 Authentication API Get token endpoint in the Authentication API. To learn more about the authentication methods available for the Authentication API, read Authentication Methods.Use Basic authentication
Use Post authentication
Parameter definition
| Parameter | Description |
|---|---|
grant_type | Type of grant to execute. |
client_id | Application’s client ID. |
client_secret | (Optional) Application’s client secret. Only required for confidential applications using the Post token authentication method. |
refresh_token | Refresh token to exchange. |
openid, then a new ID token will be in the response as well.
Bypass MFA
If Multi-factor Authentication (MFA) is enabled and the refresh token exchange flow fails, you can use the below Action code to bypass the logic:Customize MFA
Customizable MFA allows users to enroll and challenge with factors of their choice that are supported by your application. During authentication at theoauth/token endpoint, the response returns the mfa_required error that includes the mfa_token to use the MFA API and the mfa_requirements parameter with a list of authenticators:
mfa_token to call the mfa/authenticator endpoint for a list of all factors the user has enrolled and match the same type your application supports. You also need to obtain the matching authenticator_type to issue challenges:
request/mfa/challenge endpoint.
Further customize your MFA flow with Auth0 Actions. To learn more, read Actions Triggers: post-challenge - API Object.