# Turn on two-factor authentication

## Overview

[Video: Turn on two-factor authentication](https://www.youtube.com/watch?v=Vtpndx84bk8)

This flow describes how you turn on two-factor authentication for your own [user](https://docs.ohc.network/concepts/access-governance/user.md) account in Care. With two-factor authentication on, you enter a code from an authenticator app each time you sign in.

The flow also covers your backup codes, signing in with two-factor authentication, and turning it off.

## Pre-requisites

* You are signed in as yourself.
* You know your current password.
* You have an authenticator app on your phone, or an authenticator browser extension, for example Google Authenticator, Microsoft Authenticator or Duo Mobile.

Note: Two-factor authentication is a self-service setting. You turn it on for your own account only. An administrator cannot turn it on or off for another person.

## Permissions

| Permission | Access |
| - | - |
| None. Care lets the owner of the account manage this setting. | Lets you turn two-factor authentication on or off, and replace your backup codes, for your own account. Every staff user can do this. No role is needed. |

## Steps

### 1. Open the Security tab

Open the user menu at the bottom of the sidebar. The menu button shows your name. Select **Profile**. Select the **Security** tab.

Note: The **Security** tab shows only on your own profile. It does not show for a service account.

![Step 1, Open the Security tab: the Care screen, with the control for this step outlined](/assets/images/turn-on-two-factor-authentication-2-404b9b626332b0663089a4795169503a.webp)

### 2. Start the setup

In the **Two Factor Authentication** section, select **Enable two-factor authentication**.

Note: While two-factor authentication is off, the section reads "Two-factor authentication is not currently active on your account."

![Step 2, Start the setup: the Care screen, with the control for this step outlined](/assets/images/turn-on-two-factor-authentication-3-201c9b67853046b3f885f19a9667f888.webp)

### 3. Confirm your password

Care opens the **Confirm Password** dialog. Enter your current password in **Password**. Select **Continue**.

![Step 3, Confirm your password: the Care screen, with the control for this step outlined](/assets/images/turn-on-two-factor-authentication-4-ea968d95c3899862ec69eeb31670546a.webp)

### 4. Scan the QR code

Care opens the **Two Factor Authentication** dialog with a QR code. Open your authenticator app. Scan the QR code with the app.

Note: If you cannot scan the code, select **Copy setup key**. Care shows the setup key, copies it, and shows "Secret key copied to clipboard". Enter the key in your authenticator app.

![Step 4, Scan the QR code: the Care screen, with the control for this step outlined](/assets/images/turn-on-two-factor-authentication-5-a1cd752263fb5f8d2fbfb322151e69df.webp)

### 5. Verify the setup

Your authenticator app shows a 6-digit code. Enter the code in **Enter the verification code**. Select **Verify Code**.

Note: **Verify Code** is available only after you enter all 6 digits.

Note: If Care does not accept the code, enter the current code from your app again.

![Step 5, Verify the setup: the Care screen, with the control for this step outlined](/assets/images/turn-on-two-factor-authentication-6-badb6480071d89c4ed9db6dbc657e5f1.webp)

### 6. Save your backup codes

Care shows "Two factor authentication is now enabled for your account" and a dialog with your backup codes.

Care gives you 10 backup codes. Each code has 8 digits and works only once.

Select **Copy**, **Download** or **Print** to keep the codes. **Download** saves the codes in a text file.

Save the codes in a safe place, for example a password manager. If you lose access to your authenticator app, you sign in with a backup code.

Select **Done** to close the dialog.

![Step 6, Save your backup codes: the Care screen, with the control for this step outlined](/assets/images/turn-on-two-factor-authentication-7-8b645546a8c309da6c34bd4272a5db4a.webp)

### 7. Sign in with a code

After you enter your username and password on the sign-in page, Care shows **Authenticate Your Account**.

Enter the 6-digit code from your authenticator app.

If you cannot use your authenticator app, select **Use a backup code** under "Can't access your code?". Enter one of your 8-digit backup codes.

To go back to a code from your app, select **Use authenticator app**.

Note: Care does not accept a backup code that you used before.

### 8. Replace your backup codes

Do this step only when you want new backup codes.

1. On the **Security** tab, in the **Two Factor Authentication** section, select **Regenerate backup codes**.
2. Care opens the **Regenerate Backup Codes** dialog. Enter your current password.
3. Select **Regenerate**.
4. Care shows "New backup codes generated successfully." and the **New Backup Codes** dialog. Keep the new codes as in step 6.

Note: When you regenerate, your old backup codes stop working.

### 9. Turn off two-factor authentication

Do this step only when you want to remove two-factor authentication.

1. On the **Security** tab, in the **Two Factor Authentication** section, select **Disable 2FA**.
2. Care opens the **Disable two-factor authentication** dialog. Enter your current password.
3. Select **Confirm**.

Care shows "Two-factor authentication disabled successfully".

Care deletes your setup key and all your backup codes. If you turn two-factor authentication on again, you scan a new QR code and get new backup codes.

![Step 9, Turn off two-factor authentication: the Care screen, with the control for this step outlined](/assets/images/turn-on-two-factor-authentication-10-abfb7dafb606aebee7abe426c6e23a05.webp)

## Expected Outcome

* Two-factor authentication is on for your account.
* The **Two Factor Authentication** section reads "Two-factor authentication is currently active on your account."
* Care sends you an email when you turn two-factor authentication on, and again when you turn it off.
* Each time you sign in, Care asks for a 6-digit code from your authenticator app, or one of your backup codes.
* You keep 10 backup codes for the times when your authenticator app is not available.

## Related

Concepts:

* [User](https://docs.ohc.network/concepts/access-governance/user.md)

Flows:

* [Change your password](https://docs.ohc.network/flows/access-governance/user/change-password.md)
* [Edit your profile](https://docs.ohc.network/flows/access-governance/user/edit-user-profile.md)
