> ## Documentation Index
> Fetch the complete documentation index at: https://auth0-fix-docs-5525.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> How to configure recovery codes for multi-factor authentication.

# Configure Recovery Codes for MFA

A recovery code is a unique code, generated by Auth0, allowing a user to regain account access. So if a user cannot access the device or account used for <Tooltip tip="Multi-factor authentication (MFA): User authentication process that uses a factor in addition to username and password such as a code via SMS." cta="View Glossary" href="/docs/glossary?term=multi-factor+authentication">multi-factor authentication</Tooltip> (MFA) enrollment, they can use a recovery code to authenticate.

## How it works

When using <Tooltip tip="Universal Login: Your application redirects to Universal Login, hosted on Auth0's Authorization Server, to verify a user's identity." cta="View Glossary" href="/docs/glossary?term=Universal+Login">Universal Login</Tooltip> with recovery codes enabled:

1. A user starts MFA enrollment.
2. Auth0 generates a recovery code.
3. During MFA enrollment the user is shown the recovery code prompt.
4. The user saves the recovery code and completes the enrollment process.
5. Now the user can complete MFA with the recovery code they saved if they lose access to their device or account they enrolled for MFA.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/auth0-fix-docs-5525/docs/images/cdy7uua7fh8z/6LkXKthRal1r4vIPi3137l/87d45c4202087244b20259dd30642435/2025-02-26_14-31-30.png" alt="Example recovery code prompt during multi-factor authentication enrollment" />
</Frame>

When using Universal Login with recovery codes disabled:

* Users will not see the recovery code prompt during MFA enrollment.
* Users cannot authenticate with a recovery code.

## Enable recovery codes

Recovery codes are disabled by default. You can enable recovery codes by going to [Dashboard > Security > Multifactor Auth](https://manage.auth0.com/#/security/mfa).

## Learn more

* [Challenge with Recovery Codes](/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/challenge-with-recovery-codes)
