A password is one secret, and secrets leak. A second factor makes a correct password insufficient, which covers the case rate limiting never does: the password was not guessed at all, it was reused from a breach somewhere else.
Three methods
Authenticator app (TOTP) — any standard app. 1Password, Bitwarden, Google Authenticator, Aegis.
Email codes — weaker, and worth offering anyway to people who will not install an app. A weaker method at 80% adoption protects more than a stronger one at 4%.
Recovery codes — single-use, generated at enrolment, shown once.
Secrets are encrypted at rest with libsodium. A database dump does not hand over everybody's seeds.
Enforced per role, with a grace period
| Mode | Behaviour |
|---|---|
| Optional | Available; nobody is required |
| Required | Cannot sign in without it |
| Required with grace | Required, with N days to enrol first |
Use the grace period. Switching straight to Required on a role whose members have not enrolled locks all of them out on the same morning, and they all contact you at once. With grace they are prompted, warned, given a deadline, and the ones who ignore it are handled individually.
The part most 2FA plugins get wrong
Enrolment traditionally lives on profile.php. Customers never go there — most stores block wp-admin for them, and WooCommerce sends them to /my-account/ regardless.
So requiring a second factor on a store locks out precisely the people with no way to comply. The requirement and the means to satisfy it end up on opposite sides of a wall.
There is a front-end account security page for exactly this: enrolment, recovery codes, passkeys and device management on a page a customer can reach, with no admin interface anywhere on it. If you enforce a second factor on a store, that is not optional.
Getting somebody back in
Somebody loses a phone. One command clears that account's enrolment without standing the module down for anybody else:
wp itxuo 2fa-reset <user>
And the blunt hatch, for when you cannot reach a shell at all:
define( 'ITXUO_DISABLE_2FA', true );
That constant is the documented guarantee: two-factor can never permanently lock a site's owners out. It is also site-wide and stays off until you remove it, which is why the per-user command exists.
If you can, use passkeys instead
A passkey is phishing-resistant in a way codes are not, and it *removes* a step rather than adding one. A passkey sign-in suppresses the second-factor prompt entirely, because it is already stronger.
