> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure Recovery Codes for MFA

> Configure recovery codes as an Auth0 MFA factor so users can log in when they lose access to their primary authenticator with a backup code.

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 multi-factor authentication (Multi-factor authentication (MFA): User authentication process that uses a factor in addition to username and password such as a code via SMS.) (MFA) enrollment, they can use a recovery code to authenticate.

## How it works

When using Universal Login (Universal Login: Your application redirects to Universal Login, hosted on Auth0's Authorization Server, to verify a user's identity.) 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.

![Example recovery code prompt during multi-factor authentication enrollment](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/6LkXKthRal1r4vIPi3137l/87d45c4202087244b20259dd30642435/2025-02-26_14-31-30.png)

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/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/challenge-with-recovery-codes)
