# Two-factor authentication (/docs/account/two-factor)

With two-factor authentication on, signing in needs your password and a 6-digit code from an
authenticator app on your phone. Set it up under **Two-factor authentication** in `/settings`.

## Turn it on [#turn-it-on]

<Steps>
<Step>

Enter your **Password** and choose **Set up two-factor authentication**.

</Step>
<Step>

Scan the QR code with your authenticator app. If you cannot scan it, open **Can't scan? Enter the
setup key** and type the key into the app instead.

</Step>
<Step>

Enter the 6-digit **Authentication code** the app shows and choose **Turn on**.

</Step>
<Step>

Save the **Backup codes** that appear. Store them somewhere safe: each code signs you in once if
you lose your authenticator.

</Step>
</Steps>

## Sign in with a code [#sign-in-with-a-code]

After your email and password, the app asks you to confirm it's you. Enter the **Authentication
code** from your app and choose **Verify**. Tick **Trust this device for 30 days** on a device
only you use. Without your phone, choose **Use a backup code instead** and enter one of your
backup codes.

## New backup codes or turning it off [#new-backup-codes-or-turning-it-off]

While two-factor authentication is on, enter your **Password** in the same section, then:

- **New backup codes** replaces your codes. The old ones no longer work.
- **Turn off** stops asking for a code when you sign in.

<NextSteps>

<NextStep href="/docs/account/sessions" title="Active sessions" description="See the devices signed in to your account and sign out any you do not recognize." />

<NextStep href="/docs/get-started/sign-in" title="Sign in and recover access" description="Sign in with your email and password, or reset a forgotten password by email." />

</NextSteps>
