Short answer: Open Settings > Password and authentication, click Enable two-factor authentication, scan the QR code with 2Fa Live and save your recovery codes.
Last verified 19 November 2026 against the vendor's official help page. Menu names can change, so follow the labels on your screen if they differ.
Before you start
- A signed-in GitHub account on github.com.
- GitHub's TOTP defaults are SHA1, 6 digits and a 30-second period, which 2Fa Live handles by default.
- 2Fa Live open in a browser on the device that will hold your codes.
Steps on the web
- Open Settings. Click your profile picture in the upper-right corner and choose Settings.
- Password and authentication. In the Access section of the sidebar, click Password and authentication.
- Enable two-factor. Under Two-factor authentication, click Enable two-factor authentication.
- Scan the QR code. Under Scan the QR code, scan with 2Fa Live, or click setup key to copy the secret. Enter the 6-digit code under Verify the code from the app.
- Save recovery codes. Under Save your recovery codes click Download, then I have saved my recovery codes.
Steps in the mobile app
GitHub Mobile does not use TOTP codes; it uses public-key cryptography. You must already have 2FA set up with a TOTP app or SMS before you can use GitHub Mobile for 2FA, so set up 2Fa Live first.
Scan with 2Fa Live
When GitHub shows its QR code, open 2Fa Live and add a new account by scanning it. The QR code reader page can read the code for you. If you cannot scan, choose manual entry and type the setup key (also called the secret key) that GitHub displays, then give the entry a clear label so you can tell your accounts apart.
Finish by typing the 6-digit code that 2Fa Live shows back into GitHub. TOTP codes are time-based and change every 30 seconds by default, so enter the current one. 2Fa Live stores your secrets encrypted in your browser only; nothing is sent to a server.
Backup codes and recovery
Download and store your recovery codes in a secure location. They can help you regain access if you lose your 2FA device. You can still sign in with a security key or TOTP app if you lose GitHub Mobile.
2Fa Live keeps your data in this browser only, so clearing site data or switching browsers removes your accounts. Create a local backup from the Data Management section after each new account, and store it away from the device you use every day.
Troubleshooting
- If the code is rejected, check that the label in 2Fa Live is the GitHub entry and that your clock is correct.
- If you cannot scan the QR code, click setup key and type it in manually.
- If every code is rejected, set your device date and time to automatic and use the next code: TOTP depends on the clock.
- Check that you are copying the code from the GitHub entry in 2Fa Live, not another account.
Source: GitHub official help page. Official GitHub Docs page fetched.