> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Enabling two-factor authentication

Two-factor authentication(2FA) can be enabled in Keycloak using either Google Authenticator or the One-Time Password(OTP) tool FreeOTP.

For more background on OTPs, see Keycloak’s [documentation on OTP](https://www.keycloak.org/docs/latest/server_admin/#otp-policies).

## For new users

1. Go to **Authentication**.
2. Navigate to the **Required Actions** tab.
3. Under **Configure OTP**, select **Default**.

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/EzP2zCM6A9Fxpzmy/images/psm-on-prem/2fa.png?fit=max&auto=format&n=EzP2zCM6A9Fxpzmy&q=85&s=aef2458bfa7d5393c870332b71607ac5" alt="" width="3266" height="1598" data-path="images/psm-on-prem/2fa.png" />
</Frame>

## For existing users

<Note>
  This should be done for every user that does not have an OTP configured.
</Note>

1. Go to the user profile page.
2. Under **Required Field**, select **Configure OTP**.
