> For the complete documentation index, see [llms.txt](https://docs.cubilock.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cubilock.com/user-management/security/setting-up-2fa.md).

# Setting up 2FA

This guide will walk you through the steps to set up 2FA using any authenticator app.

### Prerequisites

* An admin account.
* A smartphone with an authenticator app installed (e.g., [Google Authenticator](https://support.google.com/accounts/answer/1066447?hl=en\&co=GENIE.Platform%3DAndroid), [Authy](https://authy.com/), [Microsoft Authenticator](https://www.microsoft.com/en-us/security/mobile-authenticator-app)).

### Steps to Set Up 2FA

#### Step 1: Log In to Your Admin Account

1. Open your web browser and navigate to the login page.
2. Enter your admin username and password.
3. Click on the **Login** button.

#### Step 2: Set Up the Authenticator App

1. A QR code will appear on the screen.
2. Open the authenticator app on your smartphone.
3. Tap on the **Add Account** or **+** button.
4. Select **Scan a QR code** and scan the QR code displayed on your computer screen.

   Alternatively, if your app does not support QR codes:

   * Select **Enter a setup key** in the authenticator app.
   * Enter the account name and the key provided on the screen.

<figure><img src="/files/iTbqPD3HdcsJdLuBK0dm" alt=""><figcaption></figcaption></figure>

#### IMPORTANT!

1. You will also be provided with a set of recovery codes.
2. Save these codes in a secure place. They can be used to access your account if you lose access to your authenticator app.

<figure><img src="/files/KitIUbpNpQlQfmIVQDbA" alt=""><figcaption></figcaption></figure>

#### Step 3: Verify the Setup

1. After scanning the QR code or entering the setup key, the authenticator app will display a 6-digit code.
2. Enter this 6-digit code in the field provided on the setup page.
3. Click on the **Verify** button.

<figure><img src="/files/zNqy0m7MFaiSCtbg7NYw" alt=""><figcaption></figcaption></figure>

#### Step 4: Complete the Setup

1. You will see a confirmation message that 2FA has been successfully enabled.
2. Log out of your admin account.

### Troubleshooting

* **Invalid Code**: Ensure that the time on your smartphone is synced correctly.
* **Lost Access to Authenticator App**: Use a recovery code to log in and disable 2FA temporarily. Then, re-enable it with a new authenticator app.

### Conclusion

Setting up 2FA on your admin account significantly enhances the security of your account. Follow these steps carefully to ensure a successful setup. If you encounter any issues, refer to the troubleshooting section or contact support for further assistance.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cubilock.com/user-management/security/setting-up-2fa.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
