Blog · Guides

What is multi-factor authentication (MFA)?

Multi-factor authentication explained: the three factor types, MFA vs 2FA, TOTP, SMS, email, push and passkeys compared on security and friction, phishing-resistant MFA, and how to roll it out.

Casdoor Team · November 22, 2026 · 6 min read

This guide is written by the team that builds Casdoor and describes the standards as published (listed under Sources), with notes on how Casdoor implements them as of November 22, 2026. Spotted a mistake? Tell us.

Multi-factor authentication (MFA) requires two or more independent kinds of proof before someone can sign in. A stolen password alone is then not enough: the attacker would also need the user's phone, security key or fingerprint.

Two-factor authentication (2FA) is MFA with exactly two factors, which is by far the most common case: a password plus a code from an app, for example.

MFA vs 2FA

Short answer: 2FA means a login that requires exactly two different factors; MFA means two or more. Every 2FA is MFA; not every MFA is 2FA. The words get mixed because most deployments use two factors, so the two terms describe the same screen in practice. The difference matters when you write a policy, answer a security questionnaire, or design a login that uses three factors.

2FA MFA
Number of factors Exactly two Two or more
Relationship A subset of MFA Includes 2FA
Typical example Password + TOTP code Password, passkey and hardware key for an administrator on a new device

What decides it is the number of distinct factor types, not the number of steps on the screen:

Login Factors Is it 2FA? Is it MFA?
Password + TOTP code Knowledge + possession Yes Yes
Password + SMS code Knowledge + possession Yes Yes
Password + security key Knowledge + possession Yes Yes
Passkey with fingerprint unlock Possession + inherence Yes (two factors in one step) Yes
Password + security question Knowledge + knowledge No No
Password only Knowledge No No
Passkey with no local check Possession No No

Why the distinction matters:

  • Compliance language is exact. Frameworks often say "multi-factor authentication" and mean at least two distinct categories. A vendor that counts two passwords as two steps does not meet the requirement, even if the login screen has two fields.
  • Risk-based policies can add a third factor. For an administrator signing in from a new device, a system might require a password, a passkey and a hardware key. That is MFA with three factors, not 2FA.
  • Recovery flows are part of the policy. A login protected by MFA but recoverable with a single email link is only as strong as the mailbox. Auditors increasingly ask about recovery, not just the primary flow.

The three factor types

Factor Examples
Something you know Password, PIN, security question
Something you have Phone with an authenticator app, security key, a phone number that receives SMS
Something you are Fingerprint, face recognition

MFA means factors of different types. A password plus a security question is two things you know, so it isn't real MFA. Likewise, two passwords are one factor used twice. A password plus a one-time code from an app is two factors, because the code proves possession of the device.

Location, time of day and device reputation are risk signals. They can strengthen a decision, but they are not authentication factors.

MFA methods compared

Method How it works Phishing-resistant Friction
SMS code A one-time code sent by text message No; also exposed to SIM swapping Low
Email code or link A one-time code or link sent by email No Low
TOTP app An app such as Google or Microsoft Authenticator generates a code every 30 seconds (RFC 6238) No: a fake site can ask for the code Medium
Push approval Approve a sign-in in a mobile app No; exposed to "push fatigue" Low
Passkey or security key Public-key signature bound to the real site (WebAuthn / FIDO2) Yes Low

Phishing-resistant MFA means a method a fake login page can't relay. Codes typed by the user can be relayed in real time; WebAuthn credentials are bound to the site's origin, so they don't work on a look-alike domain. CISA and NIST guidance treat FIDO2 / WebAuthn as the phishing-resistant option.

SMS paired with a password is technically MFA, since the phone is a possession factor, but it is the weakest option: NIST classifies SMS as a restricted authenticator.

Rolling out MFA

  1. Offer several methods, so everyone has one that works: an authenticator app, passkeys, and SMS or email as a fallback.
  2. Match the method to the risk: passkeys or hardware keys for administrators and high-risk users, because they resist phishing; TOTP apps for everyone else as the default second factor; SMS only as a fallback, with monitoring, for users who cannot install an app.
  3. Give recovery codes at setup, so a lost phone doesn't mean a lost account.
  4. Require it where it matters first: administrators, then employees, then customers' sensitive actions.
  5. Add step-up rules: demand a stronger factor when the user changes a password, adds an administrator, or signs in from a new country.
  6. Limit failed attempts on codes as you do on passwords.
  7. Reduce prompts without reducing security: remember trusted devices for a period, and move users toward passkeys.
  8. Don't forget service accounts. API keys and machine credentials need their own policy; MFA for humans does not cover them.

MFA with Casdoor

Casdoor is an open-source identity provider with MFA built in: TOTP authenticator apps, SMS and email codes, and RADIUS as a second factor, plus passkeys and security keys through WebAuthn. Every method comes with recovery codes. Administrators choose per organization whether each method is optional, prompted after sign-in, or required, and can let users skip the second factor on a trusted device for a set time. Wrong codes count against the application's failed sign-in limit. Because policies are set per organization, you can require passkeys for administrators and allow TOTP for everyone else from the same deployment.

Because Casdoor is the identity provider for your apps over OIDC, SAML, CAS, LDAP and RADIUS, turning MFA on there protects every connected app. Self-host it for free, or run it on Casdoor Cloud from $6.67/month billed yearly. See also Passkey vs password, passwordless authentication and What is SSO.

FAQ

Is 2FA the same as MFA? 2FA is MFA with exactly two factors; MFA means two or more. Every 2FA is MFA, but a login with three factors is MFA and not 2FA. In practice the terms are often used interchangeably because most logins use two factors.

Is a password plus a security question 2FA? No. Both are something you know, so it's one factor used twice. The same goes for two passwords.

Is SMS 2FA still worth using? It's much better than a password alone, but it's the weakest option because of SIM swapping and phishing, and NIST classifies SMS as a restricted authenticator. Offer an authenticator app or passkeys as well.

Does "remember this device" count as a factor? No. It skips the check for a while; it isn't evidence of identity. Location, time of day and device reputation are risk signals, not factors.

Are passkeys MFA? A passkey combines something you have (the device holding the key) with a local check of something you are or know (biometrics or the device PIN), so a single passkey sign-in is generally treated as multi-factor. A passkey with no local check is a single factor.

What if a user loses their phone? They sign in with one of the recovery codes they saved at setup, then set up MFA again on the new phone.