# Two-factor sign-in

Two-factor sign-in (2FA) adds a second check after your usual sign-in (email link, Google, Microsoft or GitHub). It applies to every sign-in method, except that people who sign in with single sign-on are asked for it only if the workspace's SSO setting says so ([Single sign-on](/security/single-sign-on/)).

## Methods

-   **Passkeys and security keys**: 1Password, iCloud Keychain, Google Password Manager, Windows Hello, Touch ID, or a hardware key such as a YubiKey. A synced passkey works on your other devices too.
-   **Authenticator app**: a 6-digit code from an app such as 1Password, Google Authenticator or Microsoft Authenticator. One authenticator app per account; to move to a new phone, remove it and add it again. If your workspace requires 2FA and the authenticator is your only method, add a passkey first, because you can't remove your only sign-in method, or if you can't, ask for a [reset](#lost-your-devices-reset-two-factor).
-   **Backup codes**: 10 codes, each works once, for when you don't have your devices. They are made when you add your first method and shown once.

## Turning it on

-   Open **Settings → Sign-in and security**. Choose **Add passkey or key** (name it, then follow your browser's prompt) or **Add authenticator app** (scan the QR code, or type the setup key, then enter the code the app shows).
-   Your first method shows your **backup codes** once: copy or download them, then choose **I saved them**. **Make new codes** replaces them later (the old ones stop working).
-   Turning 2FA on leaves your other sessions signed in; the page offers **Sign out other sessions**.
-   Each method shows its type, when it was added and last used, and **Remove**. Removing your last method turns 2FA off; while your workspace requires 2FA, the last method can't be removed.
-   You get an email whenever a method is added or removed, or new backup codes are made.

## Signing in

-   After the first step, tap your passkey or key, or choose **Use an authenticator code instead** or **Use a backup code**.
-   **Trust this device** (ticked by default) skips the second step on this browser for the workspace's trust length, 30 days unless an admin changed it. **Trusted devices** in Settings → Sign-in and security lists them; **Forget** asks again next time.
-   After 5 wrong tries in 15 minutes, two-factor checks pause until the 15 minutes pass.

## Sensitive actions

Some actions ask for a quick check if your last one was more than 15 minutes ago: linking or removing a sign-in method, adding or removing a 2FA method, making new backup codes, transferring ownership, resetting someone's 2FA, changing the workspace's 2FA policy, adding or changing an audit log destination, creating the SCIM token, seat settings and storage purge. A dialog asks for a passkey tap or a code, then the action runs. Without 2FA, these actions ask you to have signed in within the last 15 minutes. Connected apps and agents can't do these actions; they answer "Do this in Settings > Security".

## Requiring it for the workspace (admins)

-   **Settings → Workspace → Security**: **Require two-factor sign-in for everyone**, the **grace period** for people without it (0 to 30 days, 7 by default), how long a device is **trusted** (0 to 90 days, 30 by default; 0 asks at every sign-in), and the **allowed methods**. Passkeys or the authenticator app must stay allowed. Turning off backup codes asks you to confirm, since a lost device then needs an admin reset. For people who sign in with SSO, the requirement applies only when the SSO setting is **Yes, always ask for termynl 2FA too**.
-   During the grace period, people without 2FA see a banner on every page and the setup screen at each sign-in. After it, sign-in stops at the setup screen until they set it up, and open sessions without a 2FA check are sent to it at their next refresh. Apps those people connected before passing a 2FA check are disconnected; they get an email and connect them again afterwards.
-   The **Members** list on the same page shows each person's 2FA (On with the number of methods, Off, or Not set up with the grace date). **Show only people without two-factor** filters it.
-   Over MCP, admins can read the policy with `get_security_policy`; `list_members` includes each person's 2FA. Changing the policy and resetting 2FA are browser only.

## Lost your devices? Reset two-factor

-   First try a **backup code**.
-   Otherwise ask a workspace admin: **Reset two-factor** on your row in Settings → Workspace → Security. Admins reset members and guests; only owners reset admins; only another owner resets an owner; nobody resets themselves.
-   A reset removes all your 2FA methods and backup codes, signs you out everywhere, disconnects your apps (Claude, Codex and other MCP apps), revokes your API keys and forgets your trusted devices. You set 2FA up again at your next sign-in. You get an email, the reset is in the audit log, and when an owner or admin was reset the other owners and admins are told to consider rotating the workspace's keys.
-   A sole owner who lost everything contacts termynl support, which verifies your identity before resetting.
