Follow these steps to set up two-factor verification for your GitHub account.
Download and install the Authenticator App from your device's App Store.
Log in to your account on the GitHub website, click your profile photo in the upper-right corner, then select "Settings".
In the "Access" section of the sidebar, click "Password and authentication".
In the "Two-factor authentication" section of the page, click "Enable two-factor authentication".
In this step, a QR code containing the secret key is displayed. Next, you need to use our Authenticator App to scan this QR code. Please keep this popup open to complete the setup.
Open our Authenticator App, tap the '+' button at the top right of the screen, and then hold your device near the computer screen to scan the QR code.
After successfully scanning, a 6-digit code will appear in your App. Please note that this code refreshes every 30 seconds.
Return to the GitHub webpage, enter the 6-digit code displayed in step 6, and then click "Verify".
Under "Save your recovery codes", click "Download" to download your recovery codes to your device. Save them to a secure location because your recovery codes can help you get back into your account if you lose access.
After saving your two-factor recovery codes, click "I have saved my recovery codes" to enable two-factor authentication for your account.
Now, you have successfully setup 2FA for your GitHub account. From now on, when you attempt to sign in to your GitHub account, you will need to use our Authenticator App.