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

# Two-factor authentication

> Protect your console login with a code from an authenticator app, keep your recovery codes safe and know what to do if you lose your phone.

Two-factor authentication (2FA) asks for a 6-digit code from an authenticator app on your phone after your password, such as Google Authenticator, Microsoft Authenticator, 1Password or Bitwarden. A [passkey](https://perfgrid.com/docs/console/security/passkeys.md) also counts as a second factor.

> [!NOTE]
>
> Console 2FA is separate from 2FA in [cPanel](https://perfgrid.com/docs/cpanel/security/how-to-enable-2fa-in-cpanel.md) and the [Grid Hosting panel](https://perfgrid.com/docs/grid-hosting/security/how-to-enable-2fa.md). Turn it on in each one you use.

## Turn on 2FA

**1. Open Password and 2FA**

In the sidebar, open **Security** > **Password and 2FA** and confirm your password.

**2. Click Enable 2FA**

Under **Two-factor authentication**, click **Enable 2FA**.

**3. Scan the QR code**

Scan the QR code with your authenticator app, or type the key under it into the app. Click **Continue**.

![Enable two-factor authentication dialog with a QR code and the setup key](https://mintcdn.com/perfgrid/sWFJqnIUuIEWyOeE/images/console/security/two-factor-authentication-setup.png?fit=max\&auto=format\&n=sWFJqnIUuIEWyOeE\&q=85\&s=44fa0f09a647848fb667455152214542)

**4. Enter the code**

Enter the 6-digit code your app shows and click **Confirm**.

**5. Save your recovery codes**

Click **View recovery codes** and store the codes in a password manager or another safe place.

![Two-factor authentication section with Disable 2FA and the 2FA recovery codes box](https://mintcdn.com/perfgrid/rir3QY8n0k7qdkOi/images/console/security/two-factor-authentication-recovery-codes.png?fit=max\&auto=format\&n=rir3QY8n0k7qdkOi\&q=85\&s=5b94c836655359e32d059a919393c4bc)

From then on, the console asks for a code every time you log in with your password.

## Recovery codes

A recovery code lets you log in without your phone: on the code page, click **Log in with a recovery code**. You get 8 codes and each works once; the console replaces a used code with a new one, so view and save your codes again afterwards.

**Regenerate codes** gives you a new set and the old codes stop working.

## If you lose your phone

* **You have a recovery code**: log in with it, click **Disable 2FA**, then **Enable 2FA** to set up your new phone.
* **You have a passkey**: click **Log in with a passkey**, then set up 2FA again.
* **You have neither**: contact us through the [contact form](https://console.perfgrid.com/contact). You don't need to log in to use it.

> [!TIP]
>
> Getting a new phone? Move 2FA before you reset the old one: click **Disable 2FA**, then **Enable 2FA** and scan the new QR code.

## Turn off 2FA

On **Password and 2FA**, click **Disable 2FA** and confirm. It is off straight away. Without a [passkey](https://perfgrid.com/docs/console/security/passkeys.md), your [API tokens](https://perfgrid.com/docs/console/api/api-tokens.md) stop working until you turn 2FA on again.

> [!WARNING]
>
> If a billing account you use requires 2FA, the console shows **Two-factor authentication required** when you open it without a second factor. Confirm with a passkey, log in again with your code, or click **Set up two-factor authentication**.

## Related articles

* [Passkeys](https://perfgrid.com/docs/console/security/passkeys.md)
* [Password and sessions](https://perfgrid.com/docs/console/security/password-and-sessions.md)
* [Users and permissions](https://perfgrid.com/docs/console/team/members-and-permissions.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.