Two-Factor Authentication
TOTP-based 2FA with any authenticator app. Per-role enforcement, backup codes, and compliance tracking.
Last updated Feb 21, 2026
Overview
Two-factor authentication (2FA) adds a second verification step after your password. Even if an attacker obtains a user's password through a data breach, phishing, or brute force, they cannot log in without the time-based code from the user's authenticator app.
ArmorPro uses the TOTP (Time-Based One-Time Password) standard defined in RFC 6238. Codes are valid for 30 seconds with a tolerance of one time window in either direction to account for minor clock drift between the server and the user's device.
Enabling 2FA
To enable two-factor authentication for your site:
- Navigate to ArmorPro → Settings
- Find the Two-Factor Authentication toggle
- Switch it on
Role restriction
Choose which user roles are required to use 2FA. By default, only the Administrator role is selected. You can extend this to any combination of roles: Editor, Author, Contributor, Subscriber, or any custom roles registered on your site.
Users whose role is not selected can still set up 2FA voluntarily from their profile page, but they will not be forced to configure it.
Supported authenticator apps
ArmorPro's 2FA works with any TOTP-compatible authenticator app, including:
- Google Authenticator
- 1Password
- Authy
- Microsoft Authenticator
- Bitwarden
Any app that supports the TOTP standard will work. If your password manager supports TOTP codes, you can use that as well.
Setting up 2FA
Each user sets up 2FA from their own WordPress profile page:
- Go to Users → Profile (or click your name in the admin bar)
- Scroll to the Two-Factor Authentication section
- Click Generate to create a new secret key
- Scan the QR code with your authenticator app (or enter the base32 secret manually)
- Enter the 6-digit code from your app to verify the setup
- Save the backup codes that are displayed
Important
Backup codes are only displayed once during setup. Copy them to a secure location immediately. If you lose your phone and your backup codes, an administrator will need to disable 2FA on your account manually.
Login flow with 2FA
Once 2FA is configured, the login process adds one additional step:
- Enter your username and password as normal
- After password verification succeeds, a 2FA screen appears
- Open your authenticator app and enter the current 6-digit code
- Click Verify to complete the login
If you do not have access to your authenticator app, click the Use backup code instead link to enter one of your backup codes.
Backup codes
During 2FA setup, ArmorPro generates 8 numeric backup codes. These are emergency codes for situations where you cannot access your authenticator app (lost phone, app reinstall, etc.).
- Each backup code can only be used once
- After use, the code is invalidated and cannot be reused
- You can regenerate a new set of backup codes from your profile at any time. Regenerating invalidates all previous codes.
- Store backup codes in a secure location (password manager, printed in a safe place)
2FA compliance dashboard
Administrators can monitor 2FA adoption across the site. The compliance section shows:
- Total number of users with 2FA enabled vs. not enabled
- Breakdown by role (how many administrators, editors, etc. have 2FA configured)
This makes it easy to identify users who have not yet set up 2FA, especially for roles where it is required.
Enforcement
When 2FA is required for a role but a user in that role has not set it up yet, ArmorPro redirects the user to their profile page after login with a notice to configure 2FA. The user can still access the admin, but the persistent reminder ensures compliance.
Tip
At minimum, require 2FA for all Administrator and Editor accounts. These roles have the highest privileges and are the most valuable targets for attackers.
Recovering from a lost device
If a user loses access to their authenticator app and has used all backup codes:
- Another administrator logs in to the WordPress admin
- Navigate to Users → All Users
- Edit the affected user's profile
- Scroll to the Two-Factor Authentication section
- Click Disable 2FA for that user
The user can then log in with just their password and set up 2FA again with their new device.
Important
If the locked-out user is the only administrator on the site, you will need to disable ArmorPro temporarily by adding define('ARMOR_DISABLE', true); to wp-config.php, then log in and reset the 2FA configuration.