The Login & security page for users
The Login & security page is where each person manages how they sign in to your site. They can add passkeys, set up two-factor authentication (2FA), and choose whether email login links work for their account. Changes save instantly, with no Save button. It only ever changes the account of the person who is logged in.
Where users find it#
| Where | How |
|---|---|
| WordPress admin | Administrators: Users → Login & security. Other roles: Profile → Login & security. |
| WooCommerce My Account | A Login & security tab at /my-account/security/. It appears when passkeys, magic links or 2FA are turned on for WooCommerce. |
| Any page | Add the shortcode [nahnls_account_security] to a page, for sites without WooCommerce. |
The panel looks the same in each place and uses your theme’s styling on the front end. A visitor who isn’t signed in sees “Please sign in to manage your login and security settings.”

What’s on the page#
The page has up to three cards. The Passkeys and Two-factor authentication cards only show if the feature is turned on for your site. The Sign-in options card is always shown.
1. Passkeys
Users add, rename and remove their passkeys here. A passkey lets them sign in with a fingerprint, face, device PIN or security key. See “Passkeys”.
If passkeys are off, administrators see “Passkeys are not enabled on this site yet” with a link to turn them on. If the user’s role isn’t allowed, the card says “Passkey sign-in is not allowed for your account’s role.” On the front end (My Account or the shortcode) the Passkeys card is simply not shown in those two cases.
2. Two-factor authentication
This section appears when 2FA is on. It shows:
- Status: an On pill with “We ask for a code each time you sign in with your password.”, or Off.
- One row for each method your site allows.
- Email code shows “Sent to” your masked address and an Always on pill.
- Authenticator app has a Set up button. After setup it has a switch and a Reconfigure link.
- Passkey has a switch once the user has added a passkey. Until then it shows Not set up and the hint “Add a passkey above first.”
- A Backup codes row that shows how many codes are left, with a New codes button (Get codes if there are none). It asks for the password first.
Turning a switch on or off saves immediately. Turning one off removes that method, and the user falls back to email codes. The authenticator app needs its setup steps first. See “Set up an authenticator app”.
A user whose role isn’t covered by 2FA sees: “Optional for your account. Set up an authenticator app or a passkey below to turn it on.” A user who is only using email codes sees: “Tip: set up an authenticator app too, so you can still sign in if an email is slow to arrive.”

3. Sign-in options
This card has a row for each way the user can sign in: Password (On), Email login link (a switch, shown when email login links are on for the site and the user’s role) and Passkey (On, or Not set up).
There is one setting the user can change:
- Email login link. Turn the switch off, and “Email me a login link” will not send a link for their account. This is useful for people who don’t want a link sent to their inbox.

Backup codes#
When a user adds their first authenticator app or passkey, the page shows Your backup codes: 8 single-use codes, shown once, with two buttons:
- Copy codes
- I’ve saved these codes
The message says: “Save these somewhere safe. Each code can be used once if you lose access to your usual method. They will not be shown again.”
To make a new set later, click New codes on the Backup codes row, enter your password under “Confirm your password to continue”, and click Confirm. This invalidates the old codes. See “Email codes and backup codes”.
What users can’t do#
- They can’t turn off 2FA if their role requires it. Email codes always remain.
- They can’t see or change anyone else’s settings.
- They can’t use the page without JavaScript. A notice says “JavaScript is required to manage two-factor authentication.”
What administrators can do for users#
An administrator can’t change a user’s methods from this page. To help someone who lost their phone, open the user’s profile in Users and click Reset 2FA. See “Email codes and backup codes”.
Messages users may see#
| Message | Meaning |
|---|---|
| “Saved.” / “Verification methods updated.” | The change was applied. |
| “No change.” | Nothing needed updating. |
| “Authenticator app enabled.” | Setup is confirmed. |
| “Removed. You will verify with an email code.” | They removed their stronger method. |
| “That code is not correct. Check the time on your device and try again.” | Wrong confirmation code. |
| “The setup session expired. Please start again.” | Click Set up again. |
| “The password you entered is incorrect.” | Wrong password on regenerate. |
| “Too many attempts. Please try again in a few minutes.” | Rate limit reached. |
| “Security check failed. Please reload the page.” | The page was open too long. Reload it. |
Tips for administrators#
- Tell your users where the page is. Link to it from your help or account pages.
- On WooCommerce, check that the Login & security tab appears in My Account after turning on a feature. If it doesn’t, re-save your permalinks (Settings → Permalinks).
- Style the page with your theme. It uses WooCommerce’s own form classes on My Account.
Troubleshooting#
- A card or row is missing: that feature is off, or the user’s role isn’t allowed. Passkeys and email login links each have their own role settings on the Passwordless tab.
- The Login & security tab is missing in My Account: none of passkeys, magic links or 2FA is turned on for WooCommerce, or permalinks need refreshing.
- Nothing happens when a user flips a switch: JavaScript isn’t running on the page. Check for a script error or a caching plugin that delays scripts.
- The shortcode shows “Please sign in”: the viewer is logged out. Put it on a page for logged-in users.
Was this helpful?
Thanks for your feedback!
✓ Feedback received. Thank you!