On X, the setting is in the main menu: Settings and privacy, then Security and account access, then Security, then Two-factor authentication, then Authentication app.
X’s help page says there are three methods to choose from: “Text message, Authentication app, or Security key.” This guide covers the authentication app. The page says: “You can use any Time-based One Time Password (TOTP) authentication app”.
It also says: “During enrollment, we’ll also make sure you have a confirmed email address associated with your account.”
If you haven’t already, X will ask you to confirm an email for your X account: Enter your email address, then tap Next. X will then send you a confirmation code via email. Back in your X account, enter the code in the prompt, then tap Verify.
You’ll be prompted to Link app now to your X account. If you don’t already have an app installed on your device, you’ll need to download one.
After you scan the QR code, tap Next.
Enter the code generated by your authentication app, then tap Verify.
You’ll see a confirmation screen. Tap Got it to finish setup.
Now, through your authentication app, you can view and use codes to log in to your X account.
These are the steps X gives for iOS. Its page also has tabs for Android and Desktop, which this guide does not cover. After you turn it on, X says: “when you log in to your account, you’ll be prompted to provide the two-factor authentication method you used during your previous login, along with your password.”
Backup
Save your backup codes
X’s help page doesn’t mention backup codes for the authentication app method. If you are ever shown any, save them somewhere apart from your phone. If you ever lose the phone, see our guide on what to do if you lose your phone.