# Multi-factor authentication

Multi-factor authentication (MFA) enhances security for your workspace. UI Bakery uses the TOTP (Time-Based One-Time Passwords) 2FA algorithm.

Admins can enable MFA in the **Workspace settings**. Once it is enabled for your workspace, each user will be prompted to set up MFA at their next login. *New* users will be required to set up MFA during the registration process.

<figure><img src="/files/3CooLfXj7vFgwA4I0q0G" alt=""><figcaption></figcaption></figure>

To configure MFA, users need to scan the *QR code* using their authenticator app, such as Google Authenticator or Microsoft Authenticator, and enter the code generated by the app. Users will be prompted to enter the code at every login until they choose to remember the device.

{% hint style="info" %}
If you can't scan the QR code, you can try the *Copy setup key* option.
{% endhint %}

## Resetting MFA

Workspace admins can also reset MFA for users who have lost access to their authenticator app. This option is located in **Users & Permissions** - you just need to click on the three dots next to the specific user. Following the reset, users will be able to set up MFA again.

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

{% hint style="info" %}
With UI Bakery **on-premise**, you have the flexibility of modifying [MFA settings](/on-premise/environment-variables.md#multi-factor-authentication), including the service name, algorithm type, and the duration for which the code remains valid.
{% endhint %}


---

# Agent Instructions: 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.uibakery.io/concepts/workspace-management/multi-factor-authentication.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.
