
Sigil adds a second authentication step to WordPress logins. Users enrol a passkey, an authenticator app, backup codes or email codes from their profile, and administrators can require 2FA for chosen roles with a grace period.
Methods
Enforcement
Enrolment without the dashboard
Put [sigil_2fa] on any page and users can set up and manage their methods there. Sites that keep members out of wp-admin need this, and enforcement redirects to that page when it exists instead of to an admin screen the user cannot open.
Multisite
Accounts are network-wide in WordPress, so second factors are too. An authenticator or backup codes cover every site on the network, the policy is set once under Network Admin, and the rate limiter counts across the network rather than per site. On a network, resetting another user’s 2FA is a Network Admin action, which is how WordPress governs user editing there.
Passkeys are bound to the domain they were created for, so by default a passkey covers the site it was registered on. A network under one operator can widen that to cover every subdomain site with the sigil_rp_id filter. It is opt-in because widening lets any site under that domain request assertions, which matters when sites have different administrators.
REST API
Routes under sigil/v1 read a user’s methods, reset or remove them, read and edit the policy, and describe or complete a pending login challenge so a decoupled front end can run the second step itself. The challenge routes are authenticated by the challenge token issued after the password step. Reading and changing anything else requires the same capability as the equivalent screen.
This does not add a second factor to token authentication. A request that authenticates with an application password never reaches the interactive login, so it is not challenged.
Recovery
Three ways back in if a second factor is lost:
edit_users capability can reset another user’s 2FA from the Users screen.wp sigil reset <user> clears a user’s second factor from the command line when no one can reach the dashboard.Application passwords
Two-factor authentication does not apply to application passwords, which authenticate REST API and XML-RPC requests. The settings screen documents this, and application passwords can be disabled per role.
assets/js/vendor/qrcode.js (https://github.com/kazuhikoarase/qrcode-generator). Draws the authenticator QR in the browser.vendor/, used to verify passkey registrations and assertions.Neither contacts an external service.