> For the complete documentation index, see [llms.txt](https://ztrust.gitbook.io/ztrust-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ztrust.gitbook.io/ztrust-documentation/user-manual-ztrust-v4.1/4.-admin-manual/4.13-set-up-multi-factor-authentication/4.13.8-time-based-otp-totp-authentication.md).

# 4.13.8 Time-based OTP (TOTP)  Authentication

*A Time-based One-time Password (TOTP) is a time-sensitive code used in two-factor authentication (2FA) to provide an extra layer of security for online accounts. It's generated by an algorithm that combines a shared secret key and the current time to produce a unique, short-lived code, displayed in the ZTrust authenticator app.*

To configure the TOTP Authentication, follow the below steps -

1. Go to the **Authentication** tab in the sidebar.<br>

   <figure><img src="/files/FZ9Xtzwm2z74IpWX8wDx" alt=""><figcaption><p>Fig. 4.12.8.a: Navingating to Authentication section</p></figcaption></figure>

2. Click on the **kebab menu (three dots)** on the right side of the browser flow. Select **Duplicate**. A popup will appear.<br>

   <figure><img src="/files/ZC8fjPfWISthTXKRqmpr" alt=""><figcaption><p>Fig 4.12.8.b: Duplicating the existing browser flow</p></figcaption></figure>

3. Provide a **Name** for the flow, "Time based OTP". Click **Duplicate**. You will be redirected to the new flow configuration.

   <figure><img src="/files/htxiGy0VHSsDnBefoAz4" alt=""><figcaption><p>Fig 4.12.8.c: Giving a name to the new browser flow for TOTP login</p></figcaption></figure>

   <figure><img src="/files/Oy8S9FBU4BIJDQY7trH5" alt=""><figcaption><p>Fig 4.12.8.d: Duplicated browser flow configuration page for TOTP login</p></figcaption></figure>

4. Delete everything under **Time based OTP forms**.<br>

   <figure><img src="/files/gJrjAKoHh8JZ1E8q6jT1" alt=""><figcaption><p>Fig 4.12.8.e.a: TOTP browser flow configuration page before deleting executions</p></figcaption></figure>

   <figure><img src="/files/S8ReV8aWrIXxzOShE1KT" alt=""><figcaption><p>Fig 4.12.2.e.b: TOTP browser flow configuration page after deleting executions</p></figcaption></figure>

5. Click on the **plus** icon on the right side of the **Time based OTP forms**. Select **Add Execution**. A popup will appear to select an execution.<br>

   <figure><img src="/files/c1c8Z4nO0Jp1CfUOfd4B" alt=""><figcaption><p>Fig 4.12.8.f: Proceeding to add a new execution to TOTP login flow</p></figcaption></figure>

6. Search for **Advanced Token Authenticator**, select it and click **Add**.

   <figure><img src="/files/ZiVyeQgcrUXxmxSY0gDv" alt=""><figcaption><p>Fig 4.12.8.g: Select 'Advanced Token Authenticator' execution to add</p></figcaption></figure>

   <figure><img src="/files/82rtmAP44vMcbRZV0Rqg" alt=""><figcaption><p>Fig 4.12.8.h: Added TOTP login execution</p></figcaption></figure>

7. Click on the **settings menu (gear icon)** on the right side of the **Advanced Token Authenticator**. A popup will appear to configure the TOTP settings.<br>

   <figure><img src="/files/3de5AXspUY1ssiKkSdS0" alt=""><figcaption><p>Fig 4.12.8.i: Proceeding to configure TOTP login</p></figcaption></figure>

8. Provide an **Alias**. Set **Number of digits in Token code, Token Code period(in seconds), Secure Key** and click **Save**.<br>

   <figure><img src="/files/FXaPz04QIdwMaNTLIbym" alt=""><figcaption><p>Fig 4.12.8.j: Configuring TOTP login</p></figcaption></figure>

9. Change **Requirement** of the Advanced Token Authenticator from **Disabled** to **Required**. This will set the flow to be executed when the flow is activated.<br>

   <figure><img src="/files/qkjlwMgl8Sq2f6eEbpcT" alt=""><figcaption><p>Fig 4.12.8.k: Changing the 'Requirement' of TOTP login</p></figcaption></figure>

10. Click on the **Actions**, on the top right of the page, and then **Bind flow**. A popup will appear.<br>

    <figure><img src="/files/FcrOLpx67pNhrifMsjTS" alt=""><figcaption><p>Fig 4.12.8.l: Proceeding to bind the TOTP login flow</p></figcaption></figure>

11. Select the **Browser flow** as the **binding type** and click **Save**.<br>

    <figure><img src="/files/BAJQoF6AXghAdNO8Yam1" alt=""><figcaption><p>Fig 4.12.8.m: Selecting a flow to bind TOTP login to</p></figcaption></figure>

The Time-based OTP Authentication is enabled now.<br>
