MFA Factors

Difficulty: Beginner

Question

What are the three categories of authentication factors used in MFA, and are all second factors equally strong?

Answer

Multi-factor authentication (MFA) requires proof from two or more independent categories of evidence before granting access. The three classic categories are something you know, something you have, and something you are. Combining categories matters: a password plus a PIN is still only one category (knowledge), so it is not true MFA.

The three factor categories

  1. Something you know (knowledge): a password, PIN or passphrase. Cheap and familiar but easily phished, guessed or reused across sites.
  2. Something you have (possession): a phone running an authenticator app, a hardware security key, a smart card, or a code sent to a device. Harder to steal remotely, but can be lost or, for SMS, intercepted.
  3. Something you are (inherence): a biometric such as a fingerprint, face or iris. Convenient and hard to share, but cannot be changed if compromised and raises privacy concerns.

Two further categories are sometimes added: somewhere you are (location or network context) and something you do (behavioural patterns such as typing rhythm). These are usually risk signals rather than primary factors.

Why MFA is powerful

Even if an attacker steals your password through phishing or a breach, they still need the second factor. This single step blocks the vast majority of automated account-takeover attacks, which is why banks, UPI apps and workplaces mandate it. MFA does not make an account unbreakable, but it dramatically raises the cost.

Not all second factors are equal

FactorStrengthWeakness
SMS OTPWeakSIM swap, phishing, SS7 interception
Authenticator app (TOTP)MediumPhishable via a real-time proxy page
Push approvalMediumMFA fatigue, accidental approval
Hardware key / passkey (FIDO2, WebAuthn)StrongNeeds a device, small extra cost

SMS is the weakest because of SIM-swap fraud, a real problem in India where attackers port a victim's number to intercept OTPs. TOTP codes and push prompts can be relayed through phishing proxies that sit between the user and the real site. Only WebAuthn and passkeys are phishing-resistant, because the credential is cryptographically bound to the website's origin, so it simply will not work on a look-alike domain.

Practical guidance

  • Offer at least TOTP; prefer passkeys or security keys for high-value accounts.
  • Use number-matching push prompts to counter MFA fatigue.
  • Treat biometrics as a convenient unlock for a device-bound key, not as a secret sent over the network.
  • Require MFA again for sensitive actions such as changing the password or payout details, not just at login.

Common mistakes

  • Counting a password plus security questions as MFA; both are knowledge factors.
  • Relying on SMS OTP as the only second factor.
  • Adding MFA at login but leaving account recovery as a weak single factor, which attackers target instead.
  • Not offering phishing-resistant options for admins and finance users.
The three MFA factor categories. True MFA combines factors from different categories, not two of the same.
CategoryExamplesMain weakness
Something you knowPassword, PINPhished, reused, guessed
Something you havePhone, security keyLost, SMS intercepted
Something you areFingerprint, faceCannot be changed if leaked

Code examples

Verify a TOTP code on the server (Node.js)

import { authenticator } from 'otplib';

// On enrolment, generate and store a per-user secret
const secret = authenticator.generateSecret();
// show it as a QR code (otpauth:// URI) for the authenticator app

// On login, after the password passes, verify the 6-digit code
const isValid = authenticator.verify({
  token: req.body.code,   // the code the user typed
  secret,                 // the user's stored secret
});
// authenticator.verify allows a small time window for clock drift
if (!isValid) return res.status(401).json({ error: 'Invalid code' });

TOTP derives a 6-digit code from a shared secret and the current 30-second time window. The server recomputes the expected code and allows a small drift window so a slightly off clock still works.

Key points

  • The three factor categories are knowledge, possession and inherence.
  • True MFA combines different categories; two passwords is not MFA.
  • MFA blocks most automated account-takeover even if the password leaks.
  • SMS OTP is the weakest factor due to SIM swap and interception.
  • WebAuthn and passkeys are phishing-resistant because they are bound to the origin.

Common follow-up questions

  • Why is SMS considered the weakest MFA factor?
  • How does TOTP generate a code and why does it change every 30 seconds?
  • What makes WebAuthn phishing-resistant?
  • What is MFA fatigue and how does number matching help?

Interview tips

  • State clearly that factors must come from different categories; it is the classic trick question.
  • Rank second factors by strength; saying all MFA is equal is a red flag.
  • Mention SIM-swap for SMS and origin-binding for passkeys to show current knowledge.

Concepts covered

Multi-factor Authentication, Authentication Factors, TOTP, WebAuthn, Phishing Resistance

More Web Security (OWASP, JWT, XSS, CSRF) questions