# Secure your account with two-factor authentication

Two-factor authentication adds a second step to every sign-in to Redocly.
After your password, social account, or SSO identity provider confirms who you are, Redocly also asks for a code from an authenticator app, a backup code, or a passkey.
Someone who learns your password, or gets into your identity provider account, still can't sign in without your second factor.

Two-factor authentication is a setting of your Redocly user account, not of an organization.
After you turn it on, Redocly asks for the second factor whenever you sign in, in every organization you belong to.

## Before you begin

Make sure you have the following:

- an authenticator app on your phone or computer, for example Google Authenticator, Microsoft Authenticator, 1Password, or Authy
- your Redocly password, if you sign in with a password
- (Optional) a device that supports passkeys, such as a laptop with a fingerprint reader or a phone with a screen lock

## Turn on two-factor authentication

To turn on two-factor authentication:

1. Open the [user profile menu](/docs/platform/user-profile-menu) and select the **Security** tab.
2. Click **Turn on**.
3. If you sign in with a password, enter it.
  If you sign in only with SSO or a social account, Redocly doesn't ask for a password.
4. Scan the QR code with your authenticator app.
  If you can't scan it, type the key displayed under the QR code into the app.
5. In Redocly, enter the six-digit code that the app displays, and click **Verify**.

Redocly turns on two-factor authentication and displays your backup codes.

## Save your backup codes

When you turn on two-factor authentication, Redocly displays 10 backup codes.
A backup code replaces the code from your authenticator app when you don't have the app at hand.

Follow these rules for backup codes:

- Immediately copy or download the codes and keep them somewhere safe, such as a password manager.
  Redocly displays them only once.
- Each code works only once.
- To get a new set, go to the **Security** tab and click **Get new backup codes**.
  Your old codes stop working immediately.

Get a new set before you run out of codes.

## Add a passkey

Set up a passkey to confirm a sign-in with your fingerprint, face, or device PIN instead of typing a code.
In Redocly a passkey is only a second factor: you still sign in with your password, social account, or SSO first.

You must have two-factor authentication turned on before you can add a passkey.

To add a passkey:

1. Open the user profile menu and select the **Security** tab.
2. Under **Passkeys**, click **Add a passkey**.
3. Give the passkey a name that tells you which device it's on, for example `Work laptop`.
4. If you sign in with a password, enter it.
5. Click **Continue** and follow the prompt of your browser or device.

You can add several passkeys, for example one for each device you use.
A passkey works only in the Redocly region where you added it.
Add a separate passkey if you use both the US and the EU region.

## Remove a passkey

Remove a passkey when you no longer use the device it's on.

To remove a passkey:

1. Open the user profile menu and select the **Security** tab.
2. Under **Passkeys**, click **Remove** next to the passkey and confirm.

After you remove it, the passkey no longer confirms your sign-ins.
Your authenticator app and backup codes keep working.

## Sign in with two-factor authentication

After you enter your password, Redocly asks for your second factor.
Use whichever one you have at hand:

- **Authenticator app**: enter the current six-digit code from the app.
- **Backup code**: click **Use a backup code** and enter one of your saved codes.
- **Passkey**: click **Use a passkey** and follow the prompt of your browser or device.
  Redocly offers this option only when you have added a passkey.

You have 10 minutes to finish the second step.
After that, start the sign-in again.

Redocly asks for the second factor on every sign-in.
There is no option to remember a trusted device.

## Two-factor authentication and SSO or a social account

When two-factor authentication is on, Redocly asks for your second factor after SSO and social sign-ins too.
Your identity provider or social account confirms who you are first, and then Redocly displays the two-factor step.
This step happens even if your identity provider already asked you for its own multi-factor authentication.

## Turn off two-factor authentication

To turn off two-factor authentication:

1. Open the user profile menu and select the **Security** tab.
2. Click **Turn off**.
3. If you sign in with a password, enter it.

After you turn it off, Redocly no longer asks for a second factor.
Your passkeys stay saved, but Redocly doesn't ask for them until you turn two-factor authentication on again.
Your backup codes and the key in your authenticator app stop working.

## Recover access when you lose your device

If you lose the device with your authenticator app:

1. Sign in with one of your backup codes.
2. Open the **Security** tab and turn two-factor authentication off and on again to connect your new device.
  You get a new set of backup codes at the same time.

If you have a passkey on another device, you can confirm the sign-in with it instead of a backup code.

If you have no authenticator app, no passkey, and no unused backup codes, you can't sign in by yourself.
Contact Redocly support to recover access to your account.

## Limits for organization owners

Two-factor authentication is a setting of each person's account.
Organization owners can't:

- require members of the organization to turn on two-factor authentication
- turn two-factor authentication on or off for another person
- reset another person's authenticator app, backup codes, or passkeys

## Resources

- **[User profile menu](/docs/platform/user-profile-menu)** - Open the menu that holds your security settings, notifications, and connected Git accounts
- **[SSO and login](/docs/platform/organization/sso/sso)** - Configure how people in your organization sign in before the two-factor step
- **[Manage people](/docs/platform/organization/manage-people)** - Invite and remove people in your organization
