Bitzu

GH-900 ยท Security and administration

Two-factor authentication and passkeys

Why 2FA matters, 2FA methods (authenticator app, security key, SMS), recovery codes, and passkeys as phishing-resistant sign-in.

Key points

  • 2FA adds a second proof of identity to your password, so a stolen password alone is not enough.
  • Methods: authenticator app (time-based codes), security key (hardware or built-in like Windows Hello), and SMS codes.
  • Save your recovery codes, because support cannot restore a 2FA account for you.
  • A passkey can replace the password and 2FA with one phishing-resistant step; keep a fallback method.

Source: https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication

Practice questions

Single choice

What is the main security benefit of enabling two-factor authentication on a GitHub account?

  1. A stolen password alone is no longer enough to sign in
  2. All repositories on the account become private
  3. Commits are automatically encrypted at rest
  4. The account can no longer be deleted by anyone
Show answer

Answer: A. A stolen password alone is no longer enough to sign in

2FA requires a second factor beyond the password, so a leaked password alone does not grant access. It does not encrypt your code or hide your repositories.

Select all that apply

Which of the following can be used as a second factor or sign-in method on GitHub?

  1. Authenticator app with time-based codes
  2. Security key
  3. Passkey
  4. Browser bookmark of the login page
  5. Your public SSH key pasted in the login form
Show answer

Answer: A. Authenticator app with time-based codes, B. Security key, C. Passkey

Authenticator apps and security keys are supported, and passkeys can sign you in. A browser bookmark and a public SSH key are not authentication factors for the web sign-in.

True or false

True or false: if you lose your 2FA device and recovery codes, GitHub Support can always simply restore access to your account.

Show answer

Answer: False

False. GitHub warns that support cannot restore access to accounts with 2FA enabled when credentials and recovery methods are lost, which is why saving recovery codes matters.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More GH-900 topics in this module