# Two-factor authentication

> Add a code from an authenticator app to your sign-in, keep backup codes, and what happens when your team requires it.

Two-factor authentication adds a second step to signing in: a six-digit code from an authenticator app on your phone. You set it up under **Your account** → **Security**, where its card shows **On** or **Off**.

> **Note:** The code step follows every sign-in except a passkey, including right after you verify your email. A passkey is a second factor itself, so it doesn't ask for the code.

## Turn it on

Turning two-factor on or off needs a recent sign-in (within the last day by default). If yours is older, the card shows **Sign in again to continue** with *For your security this needs a recent sign-in.* and a **Sign in again** link. That link brings you back without a new sign-in, so open your name menu, select **Sign out**, sign in again the way you usually do, and come back to **Security**.

1. **Start**

   Under **Two-factor authentication**, select **Enable two-factor authentication**. If your account has a password, type it in **Your password** first.
2. **Scan the code**

   Scan the QR code with an authenticator app, or select **Copy key** and paste the key into the app.
3. **Save your backup codes**

   Under **Backup codes** you get 10 codes. Select **Copy backup codes** and keep them somewhere other than your phone. Each code works once.
4. **Confirm**

   Type the code your app shows in **Code from your app** and select **Turn on**. *Two-factor authentication is on.* confirms it.

> **Warning:** Lose both your phone and your backup codes and you can't pass the code step. Store the codes before you select **Turn on**.

## Sign in with a code

Whichever way you sign in, and right after you verify your email, a **Two-factor authentication** card asks for the six-digit code from your app. Only a passkey sign-in skips it.

1. **Enter the code**

   Type it in **Authentication code**.
2. **Trust this device (optional)**

   Tick **Trust this device for 30 days** to skip the code on this device for 30 days.
3. **Verify**

   Select **Verify**.

No phone to hand? Select **Use a backup code**, enter one in **Backup code** and verify. **Use your authenticator app** switches back.

## When your organization requires it

In your organization, owners and admins can require two-factor for every member: in **Organization settings** → **General**, turn on **Require two-factor authentication** (*Members without 2FA are asked to set it up the next time they open this organization.*). The switch shows only where organizations can require it. It applies to you too: without two-factor yourself, you're sent to Security the next time you open the organization, so it's best to turn it on for yourself first. Once it's required:

- A member without it who opens one of the organization's projects is taken to Security, with **Set up two-factor authentication** at the top, until they turn it on.
- The card says *Required by* and the organization's name, and the button to turn it off is greyed out while you're a member.

## Turn it off

Like turning it on, this needs a recent sign-in. Select **Disable two-factor authentication**. If your account has a password, type it in **Your password** first. *Two-factor authentication is off.* confirms it.

## Who can

Everyone sets up two-factor for their own account. Requiring it for your organization is for owners and admins.
