跳至主要內容
WordPress.org

Taiwan 正體中文

  • 佈景主題目錄
  • 外掛目錄
  • 最新消息
  • 技術支援
  • 關於我們
  • 團隊
  • 取得 WordPress
取得 WordPress
WordPress.org

Plugin Directory

Loginward – Email OTP for Administrators

  • 提交外掛
  • 我的最愛
  • 登入
  • 提交外掛
  • 我的最愛
  • 登入

Loginward – Email OTP for Administrators

由 The Vagabond 開發
下載
  • 詳細資料
  • 使用者評論
  • 安裝方式
  • 開發資訊
技術支援

外掛說明

Loginward adds a second step to every administrator login. After an administrator enters the correct username and password, a 6-digit code is emailed to that administrator’s own address only. The WordPress session is created only after the code is entered.

There is no QR code, no authenticator app and no setup step. Every administrator is protected as soon as the plugin is activated. Editors, authors, shop managers, customers and subscribers keep logging in exactly as before.

What Loginward focuses on

Loginward does one job: making sure no one reaches an administrator dashboard with a password alone. It is built around four design decisions.

  • Enforced, not opt-in. Protection applies to every administrator account the moment the plugin is activated. No administrator has to enrol, scan anything or remember to turn it on, so no account is left unprotected.
  • Every path to an admin session is checked. The login session itself is created only after the code is verified. On every request, an administrator is accepted only with a session that was verified this way. Sessions created before activation or by other login code, Application Passwords, password logins over XML-RPC or the REST API, and admin API tokens are refused by default.
  • Mailbox takeover is considered. “Lost your password?” is disabled for administrators by default. Someone who gains access to an administrator’s mailbox therefore cannot reset the password and receive the login code.
  • Limits that hold under parallel attacks. Code attempts, emails and lockouts are counted with atomic database operations, so sending many requests at once cannot exceed the limits.

Only administrators are affected, which makes it suitable for WooCommerce stores and membership sites where customers must keep a simple login.

How it works

  1. An administrator enters a correct username and password on the login page, or on a front-end login form such as the WooCommerce “My Account” page.
  2. Before WordPress creates a login session, Loginward emails a one-time code to that administrator and shows the “Email Verification” screen.
  3. Entering the correct code completes the login.
  4. On every request, an administrator is accepted only with a session that was verified this way. Sessions created before activation or by other login plugins, and API tokens, are treated as logged out.

Brute-force protection

All limits are enforced with atomic database operations, so firing many requests in parallel cannot get around them.

  • Codes are valid for 10 minutes and work only once.
  • 5 attempts per code, after which the administrator must log in again.
  • 10 code attempts per account in 15 minutes. After that, the account is locked for 15 minutes and an alert email is sent.
  • No more than 5 code emails per account in 15 minutes.
  • Requesting a new code invalidates the previous one, and “Resend” has a 60-second cooldown.
  • Codes are stored only as keyed hashes.

Closing other entry points

  • Password logins through XML-RPC, the REST API and AJAX are refused for administrator accounts.
  • Application Passwords are disabled for administrators.
  • “Lost your password?” is disabled for administrators by default. Someone who takes over an administrator’s mailbox therefore cannot reset the password and receive the code. Another administrator can still set a new password under Users → Edit.

Settings (Settings → Loginward)

  • Send test email. Confirms that codes will arrive before you log out.
  • Trusted browsers. Optional. A trusted browser still needs the password but skips the code for 7, 14 or 30 days. Trusted browsers are forgotten when the password changes.
  • Security alerts. Lock alerts go to the affected administrator and, optionally, to the site email address.
  • Proxy support. Shows the real visitor IP when the site is behind Cloudflare or a reverse proxy.
  • Administrator API keys. Optional. Allows integrations that use API keys created by an administrator, such as WooCommerce REST API keys.
  • Protected administrators. Lists each administrator, the address their codes are sent to, their lock status (with an Unlock button) and their trusted browsers.
  • Activity log. Shows the last 200 events: codes sent, successful logins, wrong codes, locks and blocked attempts.

Privacy

Loginward does not contact any external service. Codes are sent with the site’s own wp_mail() function. The plugin stores the visitor IP address and username in the activity log, which is kept in the site’s database, limited to the most recent 200 events and can be cleared at any time. Login codes are sent to the email address in the administrator’s WordPress profile.

螢幕擷圖

The email verification screen shown after a correct password.
The email verification screen shown after a correct password.
Settings → Loginward: test email, options, protected administrators and the activity log.
Settings → Loginward: test email, options, protected administrators and the activity log.
The code screen on a phone.
The code screen on a phone.

安裝方式

  1. Make sure your site can send email. On most hosts this means installing and configuring an SMTP plugin.
  2. Upload the plugin through Plugins → Add New → Upload Plugin, or install it from the plugin directory, then activate it.
  3. Go to Settings → Loginward and click “Send test email to me”. Do not log out until the test email has arrived.

Your own session stays logged in when you activate the plugin. Every other administrator will need an email code the next time they open the dashboard.

常見問題集

Who receives the code?

Only the administrator who is logging in. The code goes to the email address in their own WordPress profile. Other administrators receive nothing.

Does it affect customers or editors?

No. Only users with the Administrator role are asked for a code. On multisite, Super Admins are asked as well.

Email stopped working and I am locked out. What can I do?

Add the following line to wp-config.php through FTP or your hosting file manager:

define( 'LOGINWARD_DISABLE', true );

Log in, fix email delivery, then remove the line.

Does it work with WooCommerce?

Yes. Administrators who log in through the WooCommerce “My Account” page are sent to the code screen. Shop managers and customers are not affected. If an integration such as a mobile app, Zapier or an ERP uses REST API keys owned by an administrator, either create the keys under a Shop Manager user (recommended) or enable “Allow administrator API keys” in the settings.

Does it work on a local development site?

Only if the local site can send or capture email, for example with the Mailpit tool built into Local, or with an SMTP plugin. Otherwise add the LOGINWARD_DISABLE line shown above while you develop.

Can I change the email text?

Yes. Use the loginward_email_subject and loginward_email_body filters.

使用者評論

Works as required

shiftgraphix 2026 年 11 月 9 日
Plugin works great. 2FA is a must-have for every website and this plugin makes it super easy to set that up.
閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Loginward – Email OTP for Administrators〉的開發相關工作。

參與者
  • The Vagabond

將〈Loginward – Email OTP for Administrators〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

變更記錄

1.0.0

  • Initial release.

中繼資料

  • 版本 1.0.0
  • 最後更新 4 週前
  • 啟用安裝數 少於 10 次
  • WordPress 版本需求 6.2 或更新版本
  • 已測試相容的 WordPress 版本 7.1.5
  • PHP 版本需求 7.4 或更新版本
  • 語言
    English (US)
  • 標籤:
    2FAemail verificationlogin securityotptwo factor
  • 進階檢視

評分

5 星,滿分為 5 星
  • 1 個 5 星使用者評論 5 星 1
  • 0 個 4 星使用者評論 4 星 0
  • 0 個 3 星使用者評論 3 星 0
  • 0 個 2 星使用者評論 2 星 0
  • 0 個 1 星使用者評論 1 星 0

撰寫評分

查看全部使用者評論

參與者

  • The Vagabond

技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

檢視技術支援論壇

  • 關於我們
  • 最新消息
  • 主機代管
  • 隱私權
  • 展示網站
  • 佈景主題目錄
  • 外掛目錄
  • 區塊版面配置目錄
  • Learn
  • 技術支援
  • 開發者資源
  • WordPress.tv ↗
  • 共同參與
  • 活動
  • 贊助基金會 ↗
  • Swag ↗
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org

Taiwan 正體中文

The WordPress® trademark is the intellectual property of the WordPress Foundation.

  • 查看我們的 X (之前的 Twitter) 帳號
  • 造訪我們的 Bluesky 帳號
  • 造訪我們的 Mastodon 帳號
  • 造訪我們的 Threads 帳號
  • 造訪我們的 Facebook 粉絲專頁
  • Visit our Instagram account
  • Visit our LinkedIn account
  • 造訪我們的 TikTok 帳號
  • Visit our YouTube channel
  • 造訪我們的 Tumblr 帳號
程式碼,如詩