Two-factor authentication is the most reliable way to protect Facebook from being hacked. Even if your password leaks or you enter it on a fake page, an outsider will not get in without the second factor. Here is how to turn on two-factor authentication on Facebook in 2026, which method to choose, where to get backup codes and what to do if the phone with your codes is lost.
How two-factor authentication works
When you log in from a new device or browser, Facebook asks not only for the password but also for confirmation with a second method. It can be:
- An authentication app (Google Authenticator, Microsoft Authenticator, Duo and similar) - generates a six-digit code that changes every 30 seconds. It works offline and does not depend on your mobile carrier.
- An SMS code sent to your phone number. Convenient but less reliable: an SMS can be delayed, and in theory scammers can get the number reissued.
- A security key - a physical device connected via USB or NFC. The most secure option, but you need to buy a key.
- Approval on a device that is already logged in - Facebook may offer to confirm the login with a notification on a phone where you are already signed in.
The best choice for most people is an authentication app plus saved backup codes.
How to turn on two-factor authentication on a phone
- Open the Facebook app and tap the menu.
- Go to Settings and privacy - Settings - Accounts Center.
- Choose Password and security - Two-factor authentication.
- Select the Facebook account.
- Choose a method: Authentication app or SMS, and tap Next.
- For the app: scan the QR code in the authenticator app or copy the setup key, then enter the code it shows. For SMS: confirm the number and enter the code from the message.
- Enter your Facebook password to finish the setup.
If you are setting up the authenticator on the same phone that has Facebook, it is easier to copy the key than to scan a QR code from the phone itself.
How to turn it on on a computer
- Log in at facebook.com, click your profile picture and open Settings and privacy - Settings.
- Open Accounts Center - Password and security - Two-factor authentication.
- Select the account and the protection method.
- Scan the QR code on the screen with the authenticator app on your phone and enter the code it gives you.
- Confirm with your password.
A security key is added in the same place as a separate method once the main method is already on.
Backup codes: be sure to save them
Backup codes are a set of one-time codes that replace the second factor if your phone is lost, broken or the authenticator was deleted. You can get them in the two-factor authentication section: the Recovery codes item.
- Write the codes down on paper or store them in a password manager, but not in the notes on the same phone.
- Each code works only once. Cross out the used ones.
- If the codes run out or you think someone has seen them, generate a new set - the old one stops working.
What to do if you cannot access the second factor
- Use a backup code - on the code entry screen choose another way to log in.
- Approve the login from a device where you are already signed in. If Facebook is open on an old computer or tablet, allow the login from there.
- Try SMS if a number is linked and you have the SIM card.
- Go through recovery. If you have none of these, choose the option on the login screen saying you do not have access. Facebook will offer to confirm your identity, usually with a review period. More in how to recover a Facebook account.
When changing phones, move the authenticator in advance: many apps can export codes or sync them through a cloud account.
What else to turn on for protection
- Login alerts - notifications about every login from a new device.
- Regular session checks under "Where you're logged in". How to end unneeded ones is described in how to log out of Facebook on all devices.
- A unique password that is not used anywhere else.
Two-factor authentication matters especially if you manage a business page or an ad account: Meta increasingly requires it from admins. Promoting a page, including through an SMM panel, never requires handing over your password or codes, so if someone asks you for a code from an SMS or authenticator, they are almost certainly a scammer. General security rules for all social networks are collected in how to protect your account from hacking.