Looker provides two-factor authentication (2FA) as an additional layer of security to protect data that is accessible through Looker. With 2FA enabled, every user who logs in must authenticate with a one-time code generated by their mobile device. There is no option to enable 2FA for a subset of users.

The **Two-Factor Authentication** page in the **Authentication** section of the **Admin** menu lets you enable and configure 2FA.

Starting in Looker 26.22, 2FA is enabled by default for all new and existing Looker (original) instances that use email and password authentication and that did not opt out during the advance opt-out window. Administrators retain full control to manage or disable 2FA under **Admin** \> **Authentication** \> **Two-Factor**.

> [!NOTE]
> **Note:** If you have a permission that provides access to only select pages in the Admin panel, such as [`manage_schedules`](https://docs.cloud.google.com/looker/docs/2622/admin-panel-users-roles.md.txt#manage_schedules), [`manage_themes`](https://docs.cloud.google.com/looker/docs/2622/admin-panel-users-roles.md.txt#manage_themes), or [`see_admin`](https://docs.cloud.google.com/looker/docs/2622/admin-panel-users-roles.md.txt#see_admin), but you don't have the [Admin role](https://docs.cloud.google.com/looker/docs/2622/admin-panel-users-roles.md.txt#default_roles), the page or pages that are described here may not be visible to you in the Admin panel.

## Using two-factor authentication

Following is the high-level workflow for setting up and using 2FA. The [time synchronization requirements](https://docs.cloud.google.com/looker/docs/2622/admin-panel-authentication-two-factor.md.txt#time_synchronization_requirements), which are required for correct operation of 2FA, are described later in this document.

1. Administrator enables 2FA in Looker's admin settings (or 2FA is enabled by default starting in Looker 26.22).

   > [!NOTE]
   > **Note:** When you enable 2FA, any users who are logged in to Looker will be logged out and will have to log back in using 2FA.

2. Individual users install Google Authenticator ([iPhone app](https://itunes.apple.com/us/app/google-authenticator/id388497605) or [Android app](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2)) on their mobile devices or any compatible third-party TOTP authenticator app.

3. At first login, a user will be presented with a picture of a QR code and a manual text code on their computer screen. The user can either scan the QR code with their authenticator app or enter the manual text code in their app.

   ![](https://docs.cloud.google.com/static/looker/docs/images/qr-code-2622.png)

   After completing this step, the user will be able to generate authentication keys for Looker.

   ![](https://docs.cloud.google.com/static/looker/docs/images/auth-on-iphone.png)
4. On subsequent logins to Looker, the user will need to enter an authentication key after submitting their username and password.

   ![](https://docs.cloud.google.com/static/looker/docs/images/2factor-auth-new-2210.png)

   If a user enables the **This is a trusted computer** option, the key authenticates the login browser for a 30-day window. During this window, the user can log in with username and password alone. Every 30 days, Looker requires each user to re-authenticate the browser with their authenticator app.

## Time synchronization requirements

An Authenticator app produces time-based tokens, which require time synchronization between the Looker server and each mobile device in order for the tokens to work. If the Looker server and a mobile device are not synchronized, this can cause the mobile device user to be unable to authenticate with 2FA. To synchronize time sources, do at least one of the following:

- Set mobile devices for automatic time synchronization with the network.

- For customer-hosted Looker deployments, ensure that NTP is running and configured on the server. If the server is provisioned on AWS, you might need to explicitly allow NTP in the AWS Network ACL.

- A Looker admin can set the maximum allowed time-drift in the Looker **Admin** panel, which defines how much of a difference is permitted between the server and mobile devices. If a mobile device's time setting is off by more than the allowed drift, authentication keys won't work. The default is 90 seconds.

## Resetting two-factor authentication

If a user needs to have their 2FA reset (for example, if they have a new mobile device):

1. In the [**Users**](https://docs.cloud.google.com/looker/docs/2622/admin-panel-users-users.md.txt) page in the **Admin** section of Looker, click **Edit** on the right-hand side of the user's row to edit the user's account information.

2. In the [**Two-Factor Secret**](https://docs.cloud.google.com/looker/docs/2622/admin-panel-users-users.md.txt#two-factor_secret) section, click **Reset** to cause Looker to prompt the user to rescan a QR code or to enter the manual text code with an authenticator app the next time they attempt to log in to the Looker instance.

## Considerations

While configuring two-factor authentication, keep the following considerations in mind:

- Two-factor authentication applies only to Looker (original). It doesn't apply to Looker (Google Cloud core), which relies on Google Cloud IAM or external identity providers for multi-factor authentication.

- Two-factor authentication doesn't affect [Looker API](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest.md.txt) use.

- Two-factor authentication doesn't affect authentication through external systems such as [LDAP](https://docs.cloud.google.com/looker/docs/2622/admin-panel-authentication-ldap.md.txt), [SAML](https://docs.cloud.google.com/looker/docs/2622/admin-panel-authentication-saml.md.txt), [Google OAuth](https://docs.cloud.google.com/looker/docs/2622/admin-panel-authentication-google.md.txt), or [OpenID Connect](https://docs.cloud.google.com/looker/docs/2622/admin-panel-authentication-openid-connect.md.txt). 2FA does affect any [alternate login credentials](https://docs.cloud.google.com/looker/docs/best-practices/how-to-alternate-login-option.md.txt) that are used with these systems.