To set up two-factor authentication (2FA) on X, formerly Twitter, go to Settings and privacy → Security and account access → Security → Two-factor authentication, choose text message, an authentication app, or a security key, then follow the verification prompts. Save a backup code and check that your chosen method works before signing out.
Open X’s two-factor authentication settings
The route is the same on desktop, iPhone, and Android; the first control differs slightly by platform:
As an Amazon Associate I earn from qualifying purchases.
- Desktop web: Select More → Settings and privacy → Security and account access → Security → Two-factor authentication.
- iOS or Android: Open the menu or tap your profile icon, then select Settings and privacy → Security and account access → Security → Two-factor authentication.
X lists three methods: Text message, Authentication app, and Security key. Choose one and complete the on-screen enrollment. If your account does not already have a confirmed email address, X requires you to confirm one during setup. See X’s official setup instructions for the current prompts.
Choose a 2FA method
Each option adds a second step to sign-in after your password, but they differ in what you need to enroll and how you receive or provide verification.
#1 Best Overall
- POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
| Method | Setup requires | Practical consideration |
|---|---|---|
| Text message | A linked phone number and SMS verification | Text delivery can be delayed; a phone-number or carrier change may require an account-settings update. |
| Authentication app | A time-based one-time password (TOTP) app, a QR scan, and code verification | The app generates sign-in codes. X also documents generating a login code in its app if the phone is offline. |
| Security key | A compatible physical key and supported connection/browser | Requires compatible hardware. X says a security key can be the account’s sole 2FA method. |
X’s help pages explain how to enroll and recover access, but do not rank these methods by comparative effectiveness. Choose based on the devices and recovery options you can reliably access.
Set up an authentication app
- In Two-factor authentication, select Authentication app. Enter your X password if requested and confirm your account email if prompted.
- Open a time-based one-time password app and scan the QR code X displays.
- Enter the code generated by the app on X and verify it to finish enrollment.
X gives Google Authenticator, Authy, Duo Mobile, and 1Password as examples; its instructions do not require a particular app.
Rank #2
- POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
Set up a security key
- Select Security key, enter your password, and confirm your email if prompted.
- Start enrollment and connect or sync the key as directed. X describes connection over USB or syncing via Bluetooth or NFC.
- Follow the on-screen instructions to complete setup. For desktop enrollment, X says to use a supported, up-to-date browser.
A physical key is optional: X also offers app-based and text-message 2FA. If you choose a key, check that its connection type works with your device and browser.
Set up text-message verification
- Select Text message and verify your account password. Confirm your email if prompted.
- Add a phone number if X asks you to, then enter the SMS confirmation code.
- After setup, X sends a six-digit text code for subsequent sign-ins.
If you do not want to rely on SMS, you can enroll an authentication app or security key instead.
Rank #3
- POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
Save a backup code before you need one
X generates a backup code during authentication-app setup in its iOS and Android apps; you can also generate one on x.com. X recommends writing it down, printing it, or taking a screenshot. Keep it somewhere you can reach if you lose your phone or change your number. The code can help you sign in when your usual verification method is unavailable.
Backup codes must be used in the order generated. X says up to five active codes can exist at a time; if the code you have is inactive or invalid, generate a new one. The codes work for X sign-in surfaces listed by X, including x.com and its mobile apps. A third-party app connected to your X account may require a temporary password instead. X’s verification and recovery guidance covers these cases.
Rank #4
- POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
What to do if you cannot receive a code or access your device
An SMS code is late
Wait at least two minutes before trying to sign in again. If you recently changed your number or carrier, X says you may need to update your account settings while still signed in. If your phone is offline or in flight mode, X documents using its app’s login code generator.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Your phone is lost
Try an active backup code. If you are signed out and do not have an active code, X directs you to contact support. If SMS is your only enabled method and you are still logged in, X says you can remove the number from Mobile settings to turn off that 2FA method; set up your preferred method again afterward.
A device or app asks for your X password
Some other devices or apps that request your X password may need a temporary password after you enable 2FA. Generate one in the 2FA settings; X says it expires after one hour. It is not needed to sign in to X’s iOS or Android apps or mobile.x.com.
Keep the rest of your account secure
2FA adds a verification step to sign-in, but it does not replace good password practices. X advises using a strong password that you do not reuse on other websites. Its account-security tips also provide further guidance. For phone-number setup details, consult X’s instructions for adding a number.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitches




