Easily improve site security with WordPress Hardening, Two-Factor Authentication (2FA), Login Protection, Vuln...
Simple and secure passwordless login using email verification codes. No passwords to remember, just enter your email and verify with a 6-digit code.
OneCode Login is a WordPress plugin that enables passwordless authentication for users by sending a secure 6-digit verification code via email. This method eliminates the need for traditional passwords, making the login process simpler and more secure for users. It is suitable for membership sites, customer portals, and internal tools where ease of use and security are priorities.
The plugin includes features such as rate limiting to protect against brute force attacks, customizable settings for code expiry and email templates, and support for Gutenberg blocks and shortcodes. Developers can also use OneCode Login as an email one-time-code service to verify users without requiring a WordPress account.
Best for: This plugin is best for WordPress sites looking to enhance user experience by simplifying the login process without passwords.
What it does well
Where it falls short
OneCode Login offers a modern approach to user authentication that can improve security and user experience. It is particularly useful for sites that want to reduce password fatigue.
oaron's own description of OneCode Login, lightly tidied.
OneCode Login provides a modern, passwordless authentication experience for your WordPress site. Instead of traditional passwords, users receive a secure 6-digit verification code via email.
Other plugins on the same site can use OneCode Login as a generic email
one-time-code (OTP) service — for example to verify a guest’s email before
letting them act. OneCode emails the code and verifies it; your plugin keeps
full control of its own login/session (OneCode only asserts that the code is
valid for the email — it never logs anyone in). It works for any email
address; the address does not need a WordPress account.
All entry points are plain functions (and matching filters), so you do not need
a hard dependency on any class. The API is gated by the Settings → Advanced →
Enable developer API toggle.
Detect support (side-effect free — never call the request hook just to probe):
if ( function_exists( 'onecode_login_request_otp' ) && onecode_login_supports( 'otp' ) ) { ... }
Start authentication — email a code and receive a handle:
$handle = onecode_login_request_otp( $email, array( ‘consumer’ => ‘my_plugin’ ) );
// $handle = array( ‘request_id’, ‘auth_secret’, ‘expires_in’ (seconds), ‘expires_at’ (UTC), ‘sent’ )
// On failure: a WP_Error (codes: disabled, invalid_request, rate_limited, cooldown).
Keep request_id and auth_secret server-side (e.g. in a transient tied to the
visitor). The auth_secret is NEVER shown to the customer — it is what stops an
outsider who only knows the email from completing verification by guessing codes.
Complete authentication — the customer gives your plugin the code from the email:
$result = onecode_login_verify_otp( array(
’email’ => $email,
‘request_id’ => $handle[‘request_id’],
‘code’ => $code_from_customer,
‘auth_secret’ => $handle[‘auth_secret’],
‘consumer’ => ‘my_plugin’,
) );
// Success: array( ‘valid’ => true, ’email’ => … ). Failure: WP_Error.
On failure show a generic message to the user (the API intentionally returns a
single verify_failed code so it can’t be used as an oracle).
Other plugins for securing a site.
Easily improve site security with WordPress Hardening, Two-Factor Authentication (2FA), Login Protection, Vuln...
Firewall, Malware Scanner, Two Factor Auth, and Comprehensive Security Features, powered by our 24-hour team....
The best anti-spam protection to block spam comments and spam in a contact form. The most trusted antispam sol...
Loginizer is a WordPress security plugin which helps you fight against bruteforce attacks.
Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.
Protect your website investment with All-In-One Security (AIOS) – a comprehensive and easy to use security plu...