Two-factor authentication (2FA)
A login safeguard that asks for a second proof, such as an authenticator-app code, an SMS code or a security key, when someone logs in from a device Meta does not recognize. The methods Meta offers and what each protects against.
Two-factor authentication (2FA) means Instagram or Facebook asks for a second proof, on top of your password, when someone logs in from a browser or device Meta doesn't recognize. Meta offers several second factors: a code from an authentication app, a code by text message (SMS) or WhatsApp, or, on Facebook, a physical security key. They don't all protect against the same attacks.
Meta's page How two-factor authentication works on Facebook describes it as a login code or confirmation requested each time someone tries to access the account from an unrecognized browser or device. Instagram's page Securing your Meta Account with two-factor authentication says the same, and notes that 2FA set up in Accounts Center protects your whole Meta Account.
The methods Meta offers, compared
| SMS (or WhatsApp) code | Authentication app | Security key | |
|---|---|---|---|
| Offered on | Facebook and Instagram. Instagram adds WhatsApp once SMS is on | Facebook and Instagram. Instagram calls it recommended | |
| What you need | A confirmed phone number | An app such as Google Authenticator or Duo Mobile | A U2F or FIDO2 key you buy yourself, plus a browser or device that supports it |
| What it stops | Someone who only has your password | Someone who only has your password, and attacks on your phone number | Someone who has your password, including a fake login page, because you must physically approve the login |
| What it doesn't stop | Someone who takes over your phone number, for example by a SIM swap | A fake login page that asks for your current code and uses it straight away | Losing the key with no backup method set up |
| Meta's own advice | Add a second method, such as a security key or recovery codes | Can be linked to up to five devices | Set up a second key or another method as a backup |
The sources for the table are Meta's pages on SMS codes on Facebook, SMS codes on Instagram, authentication apps on Facebook and how security keys work. The "what it stops" rows are our reading of how each method works.
Recovery codes sit alongside all three. Facebook says you can get 10 of them for when you can't use your phone. See backup codes.
Choosing a combination
- Most people: an authenticator app plus saved backup codes.
- Accounts worth targeting, such as businesses, creators and ad admins: add a security key where Facebook offers it, and keep a second key or the app as a backup.
- If you only use SMS: it still blocks password-only attacks, but Facebook won't let you turn SMS off until an authentication app or security key is set up, so add one.
Two settings matter alongside the method. A trusted device or saved browser skips the code on later logins, and Meta warns against trusting public or shared devices. Codes also never belong in a DM: Meta's staff won't ask for them.
When 2FA works against you
2FA becomes the obstacle when you lose the phone or key with no backup, or when an attacker turns it on with their own method after a takeover. Those are recovery problems, not setup ones. See Instagram 2FA locked out, our guide on an Instagram hacker turning on two-factor authentication, and the post-recovery security checklist.
Related terms
Common questions.
Both are managed in Accounts Center (or Meta Account settings), under Password and security, then Two-factor authentication, where you choose a method for each account.
A security key or an authentication app protects against more attacks than SMS. Meta's Instagram help page recommends the authentication app. If you use SMS, add a second method as a backup.
Use one of your saved backup codes if you have them. If not, start Meta's recovery flow from the login screen, which may ask you to confirm your identity.