How to enable Two-Factor Authentication for GitHub
by Kevin Archer·Updated 01 Oct 2024·5 minutes to read
Download Authenticator App
Before we start, download GitHub Authenticator App by searching for it in your Apple device's App Store or click on the button below Download on the App Store
Locate 2FA Settings
Sign in to your GitHub account and click Settings from the drop-down menu next to your profile picture in the upper right corner.
Enable Two-Factor Authentication
Go across to Password and authentication scroll down to Two-factor authentication and then click on Enable two-factor authentication
Next Step
Select Set up using an app and click Continue.
Set up Two-Factor Authentication
In this step is shown the QR Code that contains the secret key which you need to scan with Authenticator App. Keep this page open as you reach for your device.
Note: Do not scan the demo image shown below.
Capture QR Code
Open Authenticator App, tap the plus button, and hold your device up to the computer screen to scan the QR Code from GitHub web page.
Verification code
After successfully scanning the QR Code, Authenticator App will automatically choose the GitHub logo and autofill the account name and secret key. Click on Save when ready.
Tip: You can choose the account icon by pressing on icon
Confirm OTP code
Returning to the Github, type in the six digit code from Authenticator App in the appropriate field. When done click Continue.
Save Your Recovery Codes
You'll now be displayed a list of recovery codes. These are used to gain access to your account in the event you lose access to your phone so you can either download them to your device, save in Authenticator App or store them somewhere safe. One you've done that click I have saved my recovery codes to enable two-factor authentication.
Done!
You have successfully enabled two-factor authentication(2FA) to protect your GitHub account, from now on, you will need to use the Authenticator App when you would like to log in to your GitHub account. GitHub recommends you test it by signing out and signing back in using two-factor authentication, so in case of problems, you can use recovery codes to access your account and correct the problem.
You're all set! You've enabled Two-Factor Authentication (2FA) for your GitHub account. To learn more, visit the GitHub support page. Stay safe!
Was this article helpful?
Here are some more articles you might like to read next: