Magic links
A magic link lets a user sign in without typing a password. They enter their email address or username, Shield emails them a one-time link, and clicking the link signs them in.
How it works#
- The login page shows Email me a login link, under the login form.
- The user clicks it and lands on a page titled Sign in without a password: “Enter your email address or username and we will send you a one-time login link.”
- They enter their Email or username and click Send login link.
- Shield shows a neutral message: “If an account exists for that address, a login link has been sent. It expires in N minutes and can only be used once.”
- The user opens the email and clicks the sign-in button.
- They’re signed in and sent where they were headed, usually the dashboard.
The message in step 4 is the same whether or not an account exists. This stops anyone from using the form to find out which emails or usernames are registered.

Turn on magic links#
- Go to Settings → Login Shield and open the Passwordless tab.
- Find the Magic link (email login) section.
- Turn on Enable magic link: “Show “Email me a login link” on the login page”.
- Set the options below.
- Click Save passwordless settings.

The options
| Option | What it does |
|---|---|
| Enable magic link | Shows the “Email me a login link” option on the login page. |
| Link lifetime | How long a link stays valid, from 5 to 60 minutes. The default is 15. |
| Allowed roles | Tick the roles that can use magic links. Leave all unticked to allow every role. |
| WooCommerce | “Also show on the WooCommerce My Account login form.” On by default. |
The rules for a link#
- Each link works once. After it is used, it’s dead.
- A new request cancels the old link. Only the latest link works.
- The limit is 3 requests per 15 minutes, per IP address and per account.
- Links expire after the lifetime you set. An expired or used link shows “That login link is invalid or has expired. Please request a new one.”
- The link isn’t tied to a device. A user can request it on their computer and click it on their phone. Shield records the IP address difference in the log.
- Shield stores only a scrambled form of the link’s secret, never the secret itself.
Magic links and your other protections#
The request form is protected the same way as the normal login form:
- Lockouts, the IP blocklist and geo-blocking apply. A blocked IP can’t request a link, and the attempt is logged.
- The CAPTCHA widget and the JavaScript check apply to the request form, if you use them.
- Honeypot usernames apply. Typing one is treated as an attack.
- Rate limits apply, as above.
- 2FA still applies to stronger methods. After a magic link, a user who has added an authenticator app or passkey is still asked for that second step. A user who only has email codes is not asked again, because the link already proved they can read that inbox. See “How 2FA works”.
Magic links are only as secure as the user’s email account. Anyone who can read the inbox can sign in. For high-privilege roles, consider limiting magic links (see “Limit passwordless sign-in by role”).
The link email#
The email comes from the same branded template as the 2FA code. You can change the subject, heading and message under Email branding on the Settings tab. The sign-in button is always shown, even if you remove the {link} placeholder from the text. The placeholders are {site_name} {user_name} {link} {minutes} {ip}. The default subject is “Your login link for [site name]”.
The email is sent in the background, so it can arrive a few seconds late.
Users can opt out#
On the Login & security page, in Sign-in options, a user can turn off the switch on the Email login link row. Then “Email me a login link” won’t send a link for their account. See “The Login & security page for users”.

Using magic links in your own pages#
- A request form anywhere: add the shortcode
to a page. - For developers: the template functions and the REST endpoint are in the Developer API docs.
Troubleshooting#
- No “Email me a login link” option: magic links are off, or the page is not the login form. On WooCommerce, check the WooCommerce option.
- The email never arrives: check spam and your site’s email delivery. Test with the Send test button in Email branding. Remember the neutral message appears even if no email was sent.
- No email after several requests: the limit is 3 requests per 15 minutes, per IP and per account. The page still shows the neutral message. Wait 15 minutes. The Log tab shows “Magic link rate-limited”.
- “That login link is invalid or has expired.”: the link was used, expired, or replaced by a newer one. Request a new one.
- “Access temporarily restricted. Please try again later.”: the user’s IP is locked out, blocklisted or geo-blocked.
- “Passwordless login is not available for this account.”: the user’s role isn’t allowed, or they opted out.
- The user is asked for a second step after the link: this is expected for users who have added an authenticator app or passkey.
Was this helpful?
Thanks for your feedback!
✓ Feedback received. Thank you!