| 开发者 |
rebelcode
jeangalea |
|---|---|
| 更新时间 | 2026年11月12日 05:37 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-3.0-or-later |
| 版权网址: | 版权信息 |
[sigil_2fa] on any page and users can set up and manage their methods there. Enforcement sends people to that page instead of to an admin screen they can't open. On WooCommerce stores, customers manage two-factor authentication from a tab in My Account.
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 wrong second-factor codes are counted across the network. Resetting another user's 2FA is a Network Admin action there, which is how WordPress governs user editing on a network.
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 every subdomain site with the sigil_rp_id filter. It's opt-in because widening lets any site under that domain request passkey sign-ins, which matters when sites have different administrators.
REST API
A decoupled front end can handle sign-in itself through routes under sigil/v1. They run the passwordless passkey sign-in and the login challenge, read, reset or remove a user's methods, and read and edit the policy. The challenge routes are authenticated by the token issued after the password step. Everything else needs the same capability as the matching screen.
Recovery
Several 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 nobody can reach the dashboard.wp sigil unlock <user> [--ip=<address>] [--challenge] reopens password sign-in for an account paused by too many wrong passwords./wp-content/plugins/sigil-2fa/.[sigil_2fa] and they can enrol there.Use one of the backup codes shown when you first set up 2FA. If you did not keep those, another administrator can reset your account from the Users screen. If nobody can get in at all, anyone with server access runs wp sigil reset <your-username> and your second factor is cleared.
After five wrong passwords, password sign-in for that account pauses for 15 minutes, longer if it keeps happening, up to an hour. A passkey still signs you in during the pause. To reopen it straight away, anyone with server access runs wp sigil unlock <your-username>. Add --ip=<address> to clear an address that was paused too, and --challenge to clear wrong second-factor codes as well. A device you've told Sigil to remember also gets past the pause with the right password. Behind a proxy or CDN every visitor can share the proxy's address, so return the real visitor address from the sigil_client_ip filter, and only when your proxy sets it.
No. All authentication happens on your own site. The plugin does not contact any external service and does not require an account.
Application passwords bypass 2FA by design, as that is how WordPress authenticates automated requests. The settings screen documents this, and application passwords can be disabled per role to close that path. The account password itself is refused on XML-RPC and REST for anyone with a second factor, because those requests never reach the challenge.
Passkeys need PHP 8.0 or newer. On older PHP the plugin still runs and offers authenticator apps, backup codes, and email; only the passkey method is hidden.
Yes. The policy is set once for the network under Network Admin → Settings → Sigil, and a user's authenticator or backup codes work on every site because WordPress accounts are network-wide. Passkeys are bound to the domain they were created for, so each site gets its own unless you widen that with the sigil_rp_id filter.
Yes. Put [sigil_2fa] on a page. Users manage their methods from there, and anyone required to enrol is sent to that page rather than to the dashboard.
Yes. Sigil imports from Two Factor (including passkeys from the WebAuthn Provider for Two Factor), Wordfence and WP 2FA. With both plugins active, open Settings → Sigil and choose the import, or run wp sigil import <two-factor|wordfence|wp-2fa> (add --dry-run to preview). Authenticator apps, passkeys, email codes and backup or recovery codes come across, so people keep signing in the way they already do. Anyone with a method that can't be carried over is listed in the report, and the old plugin keeps protecting them while it stays active. The old plugin's data is never changed. Once everyone on that list has set up a method in Sigil, deactivate the old plugin.
Yes. Settings → Sigil lets you pick exactly which roles are required, and set a grace period so people are prompted to enrol rather than locked out immediately.
wp sigil unlock to reopen an account.Sigil\Login_Guard::grant().wp sigil import two-factor carry each user's email codes, authenticator app and backup codes across, so the same authenticator keeps working. Anyone with a method that cannot be carried over is named in the report and stays with Two Factor until they set one up in Sigil. Nobody is moved to email codes they did not already use, and Two Factor's own data is left as it was.sigil_challenge_text for the wording of the two-factor screen, and sigil_manage_capability for which capability reaches the settings. Values are escaped after filtering, and the capability filter only narrows, never widens.[sigil_2fa] shortcode, for sites whose users have no dashboard access. Enforcement sends people there when the page exists.sigil/v1 for reading 2FA state, managing methods, editing the policy, and completing a login challenge from a decoupled front end.sigil-2fa and the WP-CLI command is wp sigil.