> For the complete documentation index, see [llms.txt](https://docs.rulecube.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rulecube.com/v2.5/how-to-guides/logging-in-and-authorization/two-factor-authentication-2fa.md).

# Two-factor authentication (2FA)

## How do I enable 2FA?

1. Make sure you have an authentication app that supports QR codes installed on your mobile device. We recommend either of these:
   1. Microsoft Authenticator ([iOS](https://apps.apple.com/us/app/microsoft-authenticator/id983156458)) ([Android](https://play.google.com/store/apps/details?id=com.azure.authenticator))
   2. Google Authenticator ([iOS](https://apps.apple.com/us/app/google-authenticator/id388497605)) ([Android](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2))
2. Go to your account settings page by clicking on your username in the top-right corner and selecting "Settings"
3. Find the "Two-factor authentication" setting and click on Enable
4. Continue by signing out or clicking the "Complete now" button
5. Sign in with your username and password
6. After signing in, you will be presented with a QR code
7. Open your authentication app on your mobile device and scan it or enter the code manually
8. Your authentication app will now generate a new code every minute or so
9. Enter this code in Rulecube
10. You have now enabled 2FA!


---

# 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.rulecube.com/v2.5/how-to-guides/logging-in-and-authorization/two-factor-authentication-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.
