Skip to content
Glossary

What is multi-factor authentication (MFA)?

The single most effective control against stolen passwords, and one of the first questions on a security review.

Updated October 24, 2026Sources checked October 24, 20264 min readHow we check our content

In short

Multi-factor authentication (MFA) is a sign-in method that requires two or more different kinds of proof: something you know, such as a password, something you have, such as a phone, or something you are. A stolen password alone is then not enough to get in.

Also called: MFA, Two-factor authentication, 2FA

What does MFA stop that a password alone cannot?

Your users reuse passwords, and some of those passwords are already in leaked lists. MFA is what stops a reused password from becoming a breached account. For your own team, it matters even more: an admin account or a database dashboard without MFA is the easiest way into everything.

Which MFA methods are strongest, and which are weakest?

Not all second factors are equal. NIST's current guidance, SP 800-63B-4, classes codes sent by SMS or voice call as restricted, and says manually typed codes, including authenticator app codes, are not phishing-resistant. Passkeys and security keys that use cryptographic authentication bound to the real site are the strongest option it describes.

MethodWhat it isMain weakness
SMS or voice codeA code sent to a phone numberSIM swaps and number porting; NIST lists it as restricted
Authenticator app (TOTP)A code that changes every 30 secondsCan be typed into a phishing page
Passkey or security keyA cryptographic key tied to the siteNeeds a backup plan if the device is lost

Which accounts should require MFA first?

Start with the accounts that could do the most damage. First every account your team uses to run the product, such as hosting, database, code repository, email and payments; then admin roles inside your own app; then customer accounts holding money, health or other sensitive data, with MFA optional for everyone else.

  1. Every account your team uses to run the product: hosting, database, code repository, email, payments.
  2. Admin roles inside your own app.
  3. Customer accounts that hold money, health or other sensitive data, then everyone else as an option.

Auth providers such as Clerk offer MFA as a setting, so for your users it is mostly a product decision. For your team's accounts it is a checklist, and security reviews will ask to see it done.

How do you require MFA in a Supabase or Lovable app?

Supabase Auth supports authenticator app codes and phone codes. After a normal sign-in a session is at assurance level aal1; once the user passes a second factor it becomes aal2, and that level is written into the session token's aal claim. You can then make the database itself refuse sensitive rows to aal1 sessions.

  • Turn on the MFA methods you want in the Supabase dashboard and build the enrol and verify screens.
  • Add a restrictive policy that checks (select auth.jwt()->>'aal') = 'aal2' on sensitive tables. Supabase notes a token without the claim counts as aal1.
  • Choose who must use it: everyone, new users after a date, or users who have already enrolled a factor.

Hiding a screen until MFA is done is not enough on its own; the check has to sit where the data is, the same rule as in authentication vs authorization. If you use Clerk, its reverification feature asks a signed-in user to verify again before sensitive actions such as changing a password or removing MFA. Our Lovable security checklist lists the other sign-in checks, and the production readiness check gives a quick read on your app.

Common questions

What is the difference between MFA and 2FA?

2FA uses exactly two factors. MFA means two or more. In everyday use the terms are often interchangeable. Either way, the factors must be different kinds of proof: something you know, such as a password, something you have, such as a phone, or something you are.

Can MFA be bypassed?

Weaker forms can, for example SMS codes through SIM swapping or phishing pages that relay codes. Authenticator apps, passkeys and security keys are much harder to defeat. Even the weaker forms mean a stolen password alone is no longer enough to sign in.

Is SMS a safe second factor?

It is better than a password alone, but it is the weakest common option. NIST SP 800-63B-4 classes SMS and voice codes as restricted and says verifiers should check for signs such as a recent SIM change. Offer an authenticator app or passkey where you can.

Are passkeys a form of multi-factor authentication?

A passkey is a cryptographic key kept on a device and usually unlocked with a fingerprint, face or PIN, so it combines something you have with something you are or know. NIST treats this kind of cryptographic authenticator as phishing-resistant, which typed one-time codes are not.

Go deeper

Lovable authentication and secure user roles

How to add sign-in and user roles to a Lovable app safely: where roles must live, how to protect admin areas, Google sign-in, MFA, and how to test it all.

More on this: Production architecture & security · All glossary terms

Built something in Lovable you want people to rely on?

We are the engineers who take it the rest of the way — secured, tested, released and supported.