2FA

Master this essential documentation concept

Quick Definition

Two-Factor Authentication - a security process requiring users to verify their identity using two separate methods, such as a password plus a one-time code sent to a mobile device.

How 2FA Works

sequenceDiagram actor User participant LoginPage as Login Portal participant AuthServer as Auth Server participant SMSGateway as SMS/TOTP Provider participant App as Protected App User->>LoginPage: Enter username & password LoginPage->>AuthServer: Validate credentials AuthServer-->>LoginPage: Password correct AuthServer->>SMSGateway: Send one-time code (OTP) SMSGateway-->>User: Deliver OTP via SMS or Authenticator App LoginPage-->>User: Prompt for OTP User->>LoginPage: Submit OTP LoginPage->>AuthServer: Verify OTP AuthServer-->>LoginPage: OTP valid, issue session token LoginPage->>App: Grant access with session token App-->>User: Access granted to protected resource

Understanding 2FA

Two-Factor Authentication - a security process requiring users to verify their identity using two separate methods, such as a password plus a one-time code sent to a mobile device.

Key Features

  • Centralized information management
  • Improved documentation workflows
  • Better team collaboration
  • Enhanced user experience

Benefits for Documentation Teams

  • Reduces repetitive documentation tasks
  • Improves content consistency
  • Enables better content reuse
  • Streamlines review processes

From Security Walkthrough to Searchable Reference: Documenting 2FA Processes

Security onboarding sessions and IT training calls are where most teams first walk employees through setting up 2FA. Someone shares their screen, demonstrates the authenticator app setup, and explains what to do if a one-time code expires — and then that recording sits in a shared drive, rarely found when someone actually needs it.

The problem surfaces at the worst moment: a new hire is locked out at 9pm, or a contractor needs to configure 2FA for a third-party tool and cannot remember which method your organization requires. Scrubbing through a 45-minute onboarding video to find a two-minute explanation is not a practical solution under pressure.

Converting those recordings into structured documentation changes how your team accesses this knowledge. A searchable doc can surface the exact 2FA setup steps, list approved authenticator apps, and clarify your recovery code policy — all without anyone watching the full video. You can also version the documentation when your authentication requirements change, keeping instructions accurate without re-recording from scratch.

For example, if your team switches from SMS-based 2FA to an authenticator app, that policy change becomes a simple document update rather than a new training session everyone has to schedule and attend.

Real-World Documentation Use Cases

Securing Admin Access to Cloud Infrastructure Dashboards

Problem

DevOps teams managing AWS or Azure consoles rely solely on shared passwords, creating a critical single point of failure. If credentials are leaked via phishing or a data breach, attackers gain unrestricted access to production infrastructure.

Solution

2FA enforces a second verification step — typically a TOTP from Google Authenticator or Authy — so that stolen passwords alone cannot grant console access, dramatically reducing the blast radius of credential compromise.

Implementation

['Enable MFA enforcement in AWS IAM or Azure Active Directory for all users with admin or operator roles.', 'Require each team member to register a TOTP authenticator app and generate backup codes stored in a secure password manager.', 'Set IAM policies to deny console access if MFA has not been satisfied, even for valid password sessions.', 'Audit MFA enrollment status monthly using AWS IAM Credential Report and revoke access for non-compliant accounts.']

Expected Outcome

Admin console breaches from credential stuffing or phishing attacks are reduced to near zero, as attackers cannot complete the TOTP step without physical access to the registered device.

Protecting Customer Accounts on a SaaS Payment Platform

Problem

A SaaS billing platform stores sensitive financial data and payment methods. Account takeover attacks via credential stuffing put customer funds and PII at risk, and a single breach can trigger PCI-DSS compliance violations and regulatory fines.

Solution

Offering optional 2FA via SMS OTP or authenticator apps for end-user accounts adds a second barrier that invalidates stolen username/password pairs, protecting customer financial data and satisfying PCI-DSS requirement 8.3.

Implementation

['Add a 2FA enrollment flow in the user account settings page, supporting both SMS OTP and TOTP authenticator apps.', 'Send in-app notifications and email nudges encouraging users to enable 2FA, highlighting the security benefit.', 'For high-risk actions such as changing bank account details or large withdrawals, require 2FA re-verification even for already-authenticated sessions.', 'Log all 2FA events — enrollment, successful verifications, and failures — to the SIEM for anomaly detection and compliance reporting.']

Expected Outcome

Account takeover incidents drop significantly, PCI-DSS audit findings related to authentication are resolved, and customer trust scores improve as evidenced by reduced support tickets about unauthorized transactions.

Enforcing 2FA for Remote Employee VPN Access During Hybrid Work

Problem

With employees connecting from home networks and public Wi-Fi, VPN credentials are frequently targeted by brute-force and man-in-the-middle attacks. A compromised VPN account exposes the entire internal corporate network.

Solution

Integrating 2FA with the VPN gateway — using hardware tokens like YubiKey or push notifications via Duo Security — ensures that even if VPN credentials are intercepted, the attacker cannot establish a tunnel without the second factor.

Implementation

['Integrate the VPN gateway (e.g., Cisco AnyConnect or OpenVPN) with a RADIUS server connected to Duo Security or Okta for push-based 2FA.', 'Distribute YubiKeys to IT administrators and senior engineers who handle the most sensitive internal systems.', 'Configure the VPN policy to time out sessions after 8 hours and require full 2FA re-authentication on reconnect.', 'Train employees on recognizing Duo push fatigue attacks and instruct them to deny unexpected push notifications immediately.']

Expected Outcome

Unauthorized VPN access attempts that bypass password authentication are blocked at the 2FA layer, and the security team gains real-time visibility into authentication anomalies through Duo's dashboard.

Meeting SOC 2 Type II Compliance Requirements for a B2B SaaS Product

Problem

B2B SaaS companies pursuing SOC 2 Type II certification must demonstrate strong access controls over systems that process customer data. Auditors consistently flag the absence of multi-factor authentication as a critical control gap.

Solution

Implementing mandatory 2FA for all internal employee accounts and providing 2FA options to customers directly satisfies the CC6.1 logical access control criteria in the SOC 2 Trust Services Criteria framework.

Implementation

['Enforce 2FA for all employees through the identity provider (e.g., Okta or Google Workspace) and block SSO access to any internal tool without MFA completion.', "Document the 2FA policy in the company's Information Security Policy, specifying approved second factors and recovery procedures.", 'Generate monthly compliance reports showing 100% MFA enrollment among employees and share these with auditors as evidence.', 'Implement conditional access policies that escalate to 2FA re-verification when users access systems tagged as in-scope for SOC 2.']

Expected Outcome

The SOC 2 Type II audit passes CC6.1 controls without findings related to authentication, accelerating enterprise sales cycles where customers require the certification before signing contracts.

Best Practices

Prefer TOTP Authenticator Apps Over SMS-Based OTP

SMS-based OTPs are vulnerable to SIM-swapping attacks, where attackers convince carriers to transfer a victim's phone number to their SIM card, intercepting all text messages. TOTP apps like Google Authenticator, Authy, or Microsoft Authenticator generate codes locally on the device without relying on the cellular network. For high-security environments, hardware tokens like YubiKey provide an even stronger alternative.

✓ Do: Default new 2FA enrollments to TOTP authenticator apps and offer hardware token support for privileged users such as system administrators and executives.
✗ Don't: Do not make SMS OTP the only or default 2FA method, especially for accounts with access to sensitive financial, health, or infrastructure data.

Generate and Securely Store Backup Recovery Codes at Enrollment

Users who lose access to their 2FA device — through loss, theft, or a factory reset — can be permanently locked out without recovery codes. Providing one-time-use backup codes at enrollment ensures users can regain access through a secure fallback path. Recovery codes must be treated with the same sensitivity as passwords.

✓ Do: Generate 8-10 single-use backup codes during 2FA setup, prompt users to download or print them, and advise storing them in a password manager like 1Password or Bitwarden.
✗ Don't: Do not allow recovery codes to be sent via email or SMS in plaintext, and do not let users bypass 2FA entirely by providing only an email address as a recovery option.

Enforce 2FA Re-Verification for High-Risk In-Session Actions

A valid authenticated session can be hijacked through session token theft or cross-site scripting attacks. Requiring 2FA re-verification for sensitive actions — such as changing a password, transferring funds, or modifying access permissions — adds a step-up authentication layer that protects against session hijacking even after initial login.

✓ Do: Implement step-up authentication triggers for actions classified as high-risk, prompting the user to re-enter their TOTP code or approve a push notification before proceeding.
✗ Don't: Do not assume that a user who passed 2FA at login is safe to perform all actions for the entire session duration without additional verification checkpoints.

Alert Users in Real Time on 2FA Enrollment and Authentication Events

Attackers who gain access to an account may attempt to enroll their own device as a 2FA method to maintain persistent access. Sending immediate notifications to the user's registered email when a new 2FA device is added or when a login succeeds from an unrecognized location gives users the chance to detect and respond to unauthorized changes.

✓ Do: Send email or push notifications for every 2FA enrollment event, successful login with 2FA from a new device or IP, and failed 2FA attempts exceeding a threshold.
✗ Don't: Do not silently allow new 2FA device registration without notifying the account owner through an out-of-band channel they control independently.

Monitor and Respond to 2FA Fatigue and Repeated Push Denial Patterns

Push notification-based 2FA is susceptible to MFA fatigue attacks, where attackers bombard a user with approval requests hoping the user will accidentally or frustratedly approve one. Security teams must monitor for repeated push denials or rapid successive 2FA requests originating from unexpected geographies as indicators of an active attack.

✓ Do: Configure your SIEM or identity provider to alert the security team when a user denies more than three consecutive push requests within five minutes, and automatically lock the account pending investigation.
✗ Don't: Do not ignore repeated 2FA denial logs as noise — treat them as high-priority indicators of credential compromise and investigate the source IP and user account immediately.

How Docsie Helps with 2FA

Build Better Documentation with Docsie

Join thousands of teams creating outstanding documentation

Start Free Trial