Skip to content
SecureKeys

Learn

FIDO2 versus TOTP authenticator codes

Why six-digit authenticator codes can be phished in real time, and how FIDO2 security keys and passkeys prevent it.

SecureKeys Engineering ·

Time-based one-time passwords (TOTP, defined in RFC 6238) are a large step up from passwords alone. Your authenticator app and the server share a secret, and both derive a six-digit code from it every 30 seconds.

The weakness: the code works anywhere

A TOTP code is not tied to the website you type it into. An attacker running a real-time phishing proxy shows you a perfect copy of the login page, receives your password and code, and replays both to the genuine site within seconds. The shared secret also lives on the server, where a breach can expose it.

How FIDO2 differs

With FIDO2 (WebAuthn plus CTAP), the authenticator signs a challenge, and the browser includes the page’s origin in what is signed. A signature made for example-login.co is worthless to example.com. There is no shared secret; the server only stores a public key.

TOTP app FIDO2 key or passkey
Phishing-resistant No Yes, origin-bound
Secret stored by the server Shared secret Public key only
User action Read and type a code Touch (and optionally PIN or biometric)
Works offline on the device Yes Yes

When TOTP is still reasonable

TOTP remains better than SMS and better than nothing, and it is widely supported. For administrators, finance staff and anyone attackers would target, prefer FIDO2.

References

  1. RFC 6238 — TOTP: Time-Based One-Time Password Algorithm
  2. W3C Web Authentication Level 3
  3. CISA — Implementing Phishing-Resistant MFA (fact sheet)

Plan your move beyond passwords

Talk to our engineers about phishing-resistant authentication for your organisation. We reply within one business day.