Two-factor authentication and passkeys · 01 How it works

2FA and passkeys: how they work

How one-time codes, notifications, security keys and passkeys work, and why only some methods resist phishing.

One-time codes

Authenticator apps use a secret shared with the site at setup, usually through a QR code. From that secret and the current time, the app calculates a six-digit code every 30 seconds; the site does the same calculation and compares the results. No connection is needed: the code is generated on the phone.

Cryptographic keys

Security keys and passkeys work differently, based on public-key cryptography.

  1. 01
    Registration

    The device creates a key pair dedicated to that site. The site stores only the public key.

  2. 02
    Login

    The site sends a random challenge. The device signs it with the private key, after you confirm with fingerprint, face, PIN or a touch.

  3. 03
    Verification

    The site checks the signature with the public key. No secret travels over the network.

  4. 04
    Binding to the domain

    The key responds only to the domain it was created for: a fake page with a different address receives nothing.

Continue with
02 Configuration

2FA and passkeys: configuration

How to turn on two-factor authentication and passkeys on your accounts, with backup methods so you are never locked out.

↑