How to setup 2FA for GitHub account?
Step-by-step guide to setting up two-factor authentication on GitHub using an authenticator app.
Download Authenticator App
Before we start, download and install the Authenticator App from your device's App Store.
To setup 2FA for your GitHub account with our Authenticator App, you need to follow the next steps:
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, click the + button at the bottom right of the screen, then hold your device near the computer screen to scan the QR code.

After successfully scanning, a 6-digit code will be shown at the bottom of the screen. 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.
Remember to click "Save" in the Authenticator App to save your account, or you may lose access to your account!

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.