With the increasing number of X (formerly known as Twitter) account hijackings, securing your social accounts on your trusty Android phone, favorite Android tablet, or another device is essential. Using two-factor authentication is one of the best ways to do it. Two-factor authentication, or 2FA, is a way to add a layer of security so that an account hijacker can't sign in to your account, even with your username and password. This guide shows you how to set up two-factor authentication to protect your X account.

There are different types of two-factor authentication methods: text, dedicated authenticator apps, a physical security key, and email. X uses the first three methods of 2FA, and one of the first two is what you'll use the most.

Elon Musk purchased Twitter on October 27, 2022. On July 24, 2023, he announced that the social media platform had been rebranded and renamed to X. Along with this rebranding, tweets are now called posts.

How to set up 2FA on X

While setting up two-factor authentication with a phone number is straightforward, if you select 2FA via an authenticator app, you'll need to download one. We have a list of some of the best 2FA apps.

How to set up 2FA using an authenticator app

  1. Go to Twitter.com or open the X mobile app.
  2. Click More > Settings and Support > Settings and privacy.
    The main menu on X highlighting the Settings and privacy option
  3. Go to Security and account access > Security.
    Go to Security and account access > Security to set up 2FA
  4. Click Two-factor authentication.
    The security page on X highlighting the two-factor authentication option
  5. Check the Authentication app option.
    The Two-factor authentication settings highlighting the Authentication app option
  6. Click Get started and scan the QR code using an authentication app.
    Click Get started and scan the QR code using an authentication app
  7. Enter the code shown in the authentication app.
    Enter the code shown in the authentication app and confirm it
  8. When you're done, click Get backup code.
    The X 2FA confirmation screen highlighting the Get Backup Code option
  9. On the next page, click Copy code or make a note of the backup code, then store it in a safe place. It may come in handy if you lose access to your device.
    The Backup Code screen highlighting the Copy code option

How to set up 2FA using your phone number

  1. Follow the first three steps from the above section.
  2. In the Two-factor authentication menu, click the Text message option.
    The Two-factor authentication page highlighting the Text message checkbox
  3. Tap Get started.
    The confirmation page highlighting the Get started option
  4. Upon confirmation, X sends you a one-time code to the phone number you saved on it.
    The Confirm your phone number screen highlighting the Send code option
  5. If your current phone number is no longer the same as the one you saved on X, you'll need to update it. To do so, go to More > Settings and Support > Settings and privacy > Account Information > Phone.
  6. Enter the one-time code and click Confirm.
    The We sent you a code page highlighting the Confirm option

It's a good idea to use multiple two-factor authentication methods. Having multiple options ensures you can log in if one of the 2FA methods acts up. We recommend activating 2FA via a phone number and using an authenticator app. However, using 2FA via an authenticator app is more secure than text messages.

How to set up 2FA using a security key

  1. Follow the first three steps from the first section.
  2. Select the Security key option. You're prompted to add a key.
    The Create a passkey screen where you choose how you want to create a passkey
  3. If you have a USB key like the YubiKey from Yubiko, click Add USB Security key and insert the key into your device's USB slot, or tap it on the back if your device has NFC.
  4. You can also use your phone's fingerprint sensor for authentication. All you need to do is select your device, follow the on-screen instructions on your phone, and select Authenticate via fingerprint scanner/Face ID > Save your phone as a key.
    The Name your security key screen showing a security key name

Along with securing your social accounts, a YubiKey is a terrific device for unlocking your laptop. It is a great solution for anyone who wants to add an extra layer of security to their devices and accounts.

2FA isn't unhackable, but it's more secure

While 2FA is effective at keeping your accounts safe, it isn't unhackable. A recent study suggests that bypassing 2FA is possible using a Man-in-the-middle attack, which is a type of cyberattack where a hacker impersonates a website and eavesdrops to serve the victim what may look like an official login form to steal passwords and personal information.

It's still important to set up 2FA on your social media accounts as well as bank accounts that support it. There's no easy answer to online security, but prevention is always better than the cure.