When recovery codes are enabled for your tenant, Auth0 automatically generates them when a user enrolls with (MFA). The user should save the recovery code. This code can later be used if the user loses access to the device or account used for MFA. When recovery codes are disabled the MFA API will not return a recovery code when you associate a user’s first MFA factor and users cannot authenticate with a recovery code. You can enable users to authenticate with a recovery code using the MFA API.Documentation Index
Fetch the complete documentation index at: https://docs-staging.auth0-mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
-
Prompt the user for their recovery code. That value should be entered in the application for the user to authenticate.
Auth0 does not generate recovery codes for DUO and for the legacy
google-authenticatorfactor. -
Authenticate with recovery code. Call the OAuth Token endpoint with the recovery code to authenticate and generate a new recovery code. You need to specify the following parameters:
Parameter Value grant_typehttp://auth0.com/oauth/grant-type/mfa-recovery-coderecovery_codeThe recovery code provided by the user.
-
Prompt user to capture recovery code. If the call is successful, you’ll get the authentication tokens and a new recovery code:
- Notify the user that a new recovery code was generated and ask them to capture it.