Overview
Curated: · Written: · Reviewed:
Multi-Factor Authentication Design
In one line
Combine factors that fail independently so a stolen password alone never signs anyone in, and rank methods by whether they resist phishing and relay. Reach for it on every login, and require phishing-resistant WebAuthn for administrators and high-impact actions.
Key definitions
- Factor independence: each factor's compromise path shares no channel with the others (email, phone number, password vault, helpdesk).
- AAL2 / AAL3: NIST SP 800-63B assurance levels. AAL2 needs two different factor types. AAL3 needs a hardware-based authenticator with verifier-impersonation resistance.
- Relay: a proxy forwards a typed code or confirmation to the real service in real time.
- RP ID: the WebAuthn relying-party identifier. The authenticator scopes its signature to it, so it is the security boundary, not the URL.
- Step-up: a fresh factor bound to one user, session and action, demanded before a sensitive request.
- Phishing resistance: the response is bound to the origin and RP ID, so a copy of the site cannot reuse it.
Formulas and complexity
How it works
The user proves the first factor, and the verifier issues a challenge for the second. The authenticator signs that challenge together with the origin and RP ID it actually saw. The server checks the signature, rpIdHash, origin, type, and the UP or UV flags against policy, then issues a session at the assigned AAL. A proxy page changes the origin, so the signature fails at the real site.
When to use and when not to
| Method | Use it for | Avoid it for |
|---|---|---|
| SMS or voice OTP | Restricted fallback where risk allows | Admins, high-impact actions, any strong-assurance flow |
| TOTP (RFC 6238) | Transitional or fallback factor | Anything where real-time relay is a credible threat |
| Push with number matching | Consumer login with rate limits and denial handling | Blind approval, flows with no transaction context |
| Synced passkey | Broad user base, recovery through the sync provider | AAL3 actions (SP 800-63B bars syncable authenticators from AAL3) |
| Hardware-bound WebAuthn with UV | Admins, payouts, key rotation, privilege changes | Users who cannot enroll a key and have no accessible alternative |
Traps interviewers probe
- Calling TOTP phishing resistant. The secret never travels, but the typed code can be relayed inside the window. Fix: use WebAuthn for sensitive flows and say where TOTP remains acceptable.
- Recovery that bypasses the login. A helpdesk call or email reset can remove MFA entirely. Fix: treat recovery as an authentication path at equal or higher assurance, with a delay and notification.
- Two factors on one channel. Email reset plus email OTP is one factor. Fix: audit each factor's compromise path and show they do not overlap.
- Push without context. An unsolicited prompt becomes a session once someone taps approve. Fix: number matching, transaction context, rate limits, and stopping the flow after repeated denials.
- Accepting the wrong ceremony type. A registration response with type webauthn.get is not a registration. Fix: reject it, and verify type, origin, challenge and rpIdHash on every ceremony.
Interview tips
Open with "What are we defending against?" then walk the threat table, and let the threat pick the method. Expect these follow-ups: how you would take over this account (walk login, recovery, helpdesk, sync provider and session theft); why TOTP is not phishing resistant; what happens when the only device is lost; how you roll out without locking out half the users; and whether the server stores a fingerprint (it does not, the biometric only unlocks the local key).
30-second outline: Name the threat. Assign AAL to the action. Pick WebAuthn for admins and high-impact actions, and say why the signature is bound to the RP ID. Name the fallback and its limit. Close by naming the recovery path, since that is where most designs fail.
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.