TOTP / 2FA Support

Generate two-factor authentication codes securely

Back to Help Center

What is TOTP/2FA?

TOTP (Time-based One-Time Password) is a form of two-factor authentication (2FA) that generates time-sensitive codes. Many websites and services use TOTP for additional security beyond just a password.

Setting Up TOTP in Oculock

Adding TOTP to a Login Item

  1. Open the login item you want to add 2FA to (or create a new login item)
  2. Scroll down to the "Two-Factor Authentication" section
  3. Toggle on "Enable 2FA"
  4. You have two options to add your TOTP secret:
    • Scan QR Code: Tap "Scan QR Code" and point your camera at the QR code provided by the service
    • Enter Secret Manually: Tap "Enter Secret Manually" and paste the secret key provided by the service
  5. If scanning QR code, the app will automatically detect and extract the secret
  6. Review the settings (algorithm, digits, period) - these are usually auto-detected
  7. Tap "Save"

Getting TOTP Secrets from Services

To enable 2FA on a website or service, you typically need to:

  1. Go to the service's security or account settings
  2. Find the "Two-Factor Authentication" or "2FA" section
  3. Enable 2FA and choose "Authenticator App" as the method
  4. The service will show you a QR code or secret key
  5. Scan the QR code or copy the secret key into Oculock

Viewing TOTP Codes

How to View a 2FA Code

  1. Open the login item that has 2FA enabled
  2. In the 2FA section, you'll see a 6-digit code
  3. The code automatically updates every 30 seconds (or the period you configured)
  4. Tap the code to copy it to your clipboard
  5. Paste the code into the website's 2FA field

TOTP Settings

When setting up TOTP, you can configure these settings:

  • Algorithm: SHA1, SHA256, or SHA512 (most services use SHA1)
  • Digits: Number of digits in the code (usually 6, sometimes 8)
  • Period: How often the code refreshes (usually 30 seconds)

These settings are usually auto-detected from the QR code, but you can manually adjust them if needed.

Using TOTP Codes

When logging into a website that requires 2FA:

  1. Enter your username and password
  2. When prompted for the 2FA code, open Oculock
  3. Find the login item for that service
  4. Copy the current 6-digit code
  5. Paste it into the website's 2FA field
  6. Complete the login

Best Practices

  • Enable 2FA everywhere: Use two-factor authentication on all services that support it
  • Store in Oculock: Keep your TOTP secrets in Oculock alongside your passwords
  • Backup your secrets: Export your vault regularly in case you need to recover 2FA codes
  • Time sync: Ensure your device's time is accurate - TOTP codes are time-sensitive

Troubleshooting

Codes Not Working

  • Check time sync: Ensure your device's clock is accurate (TOTP codes are time-based)
  • Verify settings: Check that the algorithm, digits, and period match the service's requirements
  • Re-scan QR code: Try removing and re-adding the TOTP secret
  • Wait for refresh: Codes refresh every 30 seconds - wait for a new code if one isn't working

QR Code Not Scanning

  • Ensure good lighting
  • Hold the camera steady
  • Make sure the QR code is fully visible
  • Try entering the secret manually instead

Related Topics