- Security keys (highest security)
- Time-based one-time password (TOTP) apps (recommended for most users)
- SMS (deprecated; last resort)
2FA methods and recommendations
First, the most secure option is security keys: physical USB or NFC devices (for example, YubiKeys) that provide strong phishing resistance. In high-security enterprise environments, FIDO2 hardware keys are the gold standard. Second, time-based one-time password (TOTP) applications generate codes locally on a device. Examples include Google Authenticator, Authy, and 1Password. GitHub recommends TOTP apps for most users because they work offline, generate codes locally, and can support backups.

Security keys provide the strongest protection against phishing. For most users and teams, TOTP apps balance security and usability. Treat SMS as deprecated and only allow it temporarily for users who cannot use the other options.
How enterprise-level enforcement works (and why it can be disruptive)
At the enterprise level, GitHub provides a single toggle to “Require two-factor authentication” for everyone across the enterprise. Conceptually simple, the practical effect is immediate and strict: when enabled, GitHub evaluates every account’s 2FA status and automatically removes any user without an active 2FA method from every organization in the enterprise. This removal applies to humans and bot/service accounts alike. There is no automatic grace period or warning from GitHub.
Enabling enterprise-wide 2FA enforcement will immediately remove non-compliant users (including bots) from organizations — without notification or grace period. Plan, audit, and communicate before you flip the switch.
Operational guidance — audit, communicate, then enforce
Treat enforcement as an operational change that requires a runbook. The recommended sequence is:- Audit
- For each organization, open the People tab and filter by two-factor authentication status.
- Export the CSV of users without 2FA.
- Identify which accounts are human, contractor, outside collaborator, or service/bot.
- Cross-check
- Compare the exported list against your active employee directory and any inventory of service/bot accounts (CI/CD, automation, deploy keys, etc.).
- Flag critical accounts that need assisted onboarding to 2FA.
- Communicate
- Notify affected users with clear instructions for enabling 2FA (security keys or a TOTP app).
- Publish a remediation runbook: step-by-step guides, supported authenticators, helpdesk contacts, and a defined compliance window (commonly 7–14 days).
- Enforce
- After the compliance window and verified remediation, enable enterprise-level enforcement.
- Monitor and verify that no critical service accounts were removed. Re-invite or re-add only after confirming 2FA is configured.

Quick comparison: 2FA methods
Checklist before enabling enterprise 2FA enforcement
- Audit all organizations and export lists of users without 2FA.
- Identify and prepare service/bot accounts; update automation to use personal access tokens or machine users with 2FA where appropriate.
- Communicate timelines, instructions, and help resources to all stakeholders.
- Provide an internal help channel and assisted enrollment for users who need it.
- Schedule enforcement after the compliance window and confirm remediation for flagged accounts.