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

# Autofill OTP for online accounts

> Setting up Two-Factor Authentication with Locker adds an extra layer of security to your online accounts. You can then autofill TOTP when logging into websites and apps quickly and easily.

Setting up Two-Factor Authentication with Locker adds an extra layer of security to your online accounts. You can then autofill TOTP when logging into websites and apps quickly and easily.

First, you need to set up 2FA for your account or link your account to an existing OTP.

## Autofill TOTP from the extension

From the Locker extension, you can autofill TOTP along with login credentials for any website or service.

<Steps>
  <Step title="Visit the website">
    Visit the website you want to log into.
  </Step>

  <Step title="Autofill login">
    Locker will automatically fill in your login credentials.
  </Step>

  <Step title="Autofill TOTP">
    On the Two-Factor Authentication screen, Locker automatically detects the TOTP linked to your login credentials and autofills it. You will be authenticated successfully.

    <img src="https://mintcdn.com/locker/DGmCYM1Opanpr-4x/images/en/locker-password-manager/general-features/autofill/autofill-otp-extension-github.png?fit=max&auto=format&n=DGmCYM1Opanpr-4x&q=85&s=1955270bd92f94cff92eab457c06eb51" alt="Autofill TOTP on GitHub" style={{display: 'block', margin: '0 auto'}} width="507" height="659" data-path="images/en/locker-password-manager/general-features/autofill/autofill-otp-extension-github.png" />
  </Step>
</Steps>

If you have created 2FA for your account but have not linked it to your login credentials, the code will not be autofilled. In this case, you can click the Locker icon inside the TOTP input field, then scroll down to select the correct TOTP for the website you are logging into.

<img src="https://mintcdn.com/locker/DGmCYM1Opanpr-4x/images/en/locker-password-manager/general-features/autofill/autofill-otp-extension-select.png?fit=max&auto=format&n=DGmCYM1Opanpr-4x&q=85&s=beb35edcbe8f7507c000f89d7b2cb7f5" alt="Select TOTP from the list" style={{display: 'block', margin: '0 auto'}} width="460" height="627" data-path="images/en/locker-password-manager/general-features/autofill/autofill-otp-extension-select.png" />

## Autofill TOTP on mobile devices

From the Locker mobile app, you can autofill TOTP along with login credentials for any website or app on your phone.

### On iOS

<Steps>
  <Step title="Open the website or app">
    Open the website or app that you want to log into.
  </Step>

  <Step title="Autofill login">
    Tap the email input field and tap the Locker suggestion that appears on the keyboard. Locker will automatically fill in your login credentials.
  </Step>

  <Step title="TOTP is saved to clipboard">
    After you log in, the TOTP linked to your account will be saved to the clipboard.
  </Step>

  <Step title="Paste TOTP">
    On the Authentication screen, tap the TOTP input field and hold for a second. You will see the **Paste** option appear.

    <img src="https://mintcdn.com/locker/DGmCYM1Opanpr-4x/images/en/locker-password-manager/general-features/autofill/autofill-otp-ios-paste.png?fit=max&auto=format&n=DGmCYM1Opanpr-4x&q=85&s=811009394d9c544ecb4d89f34802b9c3" alt="Paste TOTP on iOS" style={{display: 'block', margin: '0 auto', maxWidth: '400px'}} width="868" height="1156" data-path="images/en/locker-password-manager/general-features/autofill/autofill-otp-ios-paste.png" />
  </Step>

  <Step title="Authentication successful">
    Tap the **Paste** option to autofill the TOTP code from the clipboard. You will be authenticated successfully.
  </Step>
</Steps>

<Note>
  The TOTP will expire after 30 seconds. After that, you may need to open the Locker app to get a new TOTP.
</Note>

### On Android

<Steps>
  <Step title="Open the website or app">
    Open the website or app that you want to log into.
  </Step>

  <Step title="Autofill login">
    Tap the email input field and tap the Locker suggestion that appears on the keyboard. Locker will automatically fill in your login credentials.
  </Step>

  <Step title="TOTP is saved to clipboard">
    After you log in, the TOTP linked to your account will be saved to the clipboard.
  </Step>

  <Step title="Fill TOTP">
    On the **Authentication** screen, tap the TOTP input field. You will see the TOTP code suggested on the keyboard.
  </Step>

  <Step title="Authentication successful">
    Tap the TOTP to autofill the TOTP input field. You will be authenticated successfully.
  </Step>
</Steps>

<Note>
  The TOTP will expire after 30 seconds. After that, you may need to open the Locker app to get a new TOTP.
</Note>
