Protecting ecommerce customer accounts: passwords, passkeys and recovery

A practical guide to defending online-shop customer accounts against credential stuffing and takeover, based on NIST SP 800-63B-4 and OWASP guidance.

Key points

  • Most customer account takeovers start with passwords reused from other breached sites, not with attacks on your shop itself.
  • NIST SP 800-63B-4, final since 2025, drops forced complexity rules and periodic resets in favour of length, blocklist screening and rate limiting.
  • Passkeys (WebAuthn) are phishing-resistant; SMS codes are better than nothing but are the weakest second factor.
  • Account recovery is often the easiest way in: make it as strong as login and notify customers of every change.
  • Rate limiting, bot detection and breached-password checks are low-cost defences most ecommerce platforms already support.

When a customer’s account on your shop is taken over, the attacker rarely broke into your systems. More often they arrived with a username and password stolen from somewhere else and simply logged in. The customer still blames you, and the stored addresses, order history, loyalty points and saved payment tokens are all exposed. This guide sets out what small and mid-sized online retailers can do, drawing on the current US NIST authentication guidelines and OWASP’s application security guidance.

Most shops run on a hosted platform or an open-source system with plugins, so you will not build these controls from scratch. The value of this guide is knowing what to switch on, what to ask your platform or developer for, and what to stop doing.

How customer accounts get taken over

Credential stuffing is the most common route. Attackers take large lists of email-and-password pairs leaked from unrelated breaches and try them automatically against many sites. Because people reuse passwords, a small proportion succeed. The traffic usually comes from many IP addresses and looks like ordinary failed logins spread thinly over time. OWASP’s Credential Stuffing Prevention Cheat Sheet describes the layered defences in detail.

Phishing collects passwords and one-time codes through lookalike login pages, often in emails pretending to be from your shop about an order or a refund. Our guide to common online marketplace scams covers how these messages look from the customer’s side.

Account recovery abuse targets the “forgot password” route, the support desk or the email account behind the shop account. If recovery is weaker than login, attackers will use recovery.

Session theft happens when session tokens are exposed, for example through malicious browser extensions, insecure third-party scripts or tokens that never expire.

Once inside, attackers typically change the email or delivery address, use stored payment methods, drain gift-card or loyalty balances, or harvest personal data for further scams.

Password policy: what the current standard says

The US National Institute of Standards and Technology published SP 800-63B-4, the fourth revision of its authentication guidelines, as a final publication in 2025, replacing Revision 3. It is written for US federal agencies, but it is the most widely referenced public benchmark for password rules and many private organisations follow it. Its password requirements (section 3.1.1.2) include:

Topic SP 800-63B-4 position
Minimum length At least 15 characters where a password is the only factor; at least 8 where it is used as part of multi-factor authentication
Maximum length Should allow at least 64 characters
Composition rules Must not require mixtures of character types
Blocklist Must check new passwords against a list of commonly used, expected or compromised passwords
Periodic changes Must not force routine changes, but must force a change when there is evidence of compromise
Hints and security questions Must not store hints accessible before login, and must not prompt for security questions when choosing passwords
Paste and password managers Should allow paste, which supports password managers
Truncation Must check the whole password, not a subset

For a typical shop, this translates into a short list of changes. Remove “must contain a symbol and a number” rules. Stop expiring customer passwords. Make sure the password field accepts long passphrases, spaces and pasted input. Add a screen against known breached and common passwords at sign-up and password change. Many platforms and identity providers offer breached-password detection; some use privacy-preserving lookups that check a partial hash rather than sending the password itself.

A 15-character minimum for password-only accounts may feel like friction for shoppers. In our view, the better answer is not a shorter minimum but making a password less necessary: offering passkeys and making second factors easy.

Passkeys and multi-factor authentication

Passkeys (WebAuthn)

Passkeys use the W3C WebAuthn standard: the customer’s device holds a private key and proves possession of it, usually unlocked by fingerprint, face or device PIN. Nothing reusable is typed, so there is nothing to stuff and nothing to phish. NIST’s guidance explains why: WebAuthn binds the authenticator’s response to the genuine site’s domain (“verifier name binding”), so a lookalike site cannot obtain a valid login. SP 800-63B-4 also accommodates syncable authenticators, the passkeys that synchronise across a customer’s devices through their platform account, which is how most consumer passkeys work.

For retailers, passkeys deliver both security and convenience: faster checkout logins and fewer password resets. Most major ecommerce platforms and identity providers now support them in some form; check your platform’s documentation for availability. Offer passkeys as an option alongside existing methods rather than forcing a switch.

Other second factors, ranked

CISA’s phishing-resistant MFA fact sheet and NIST both make the same distinction: some MFA can be phished, some cannot.

Method Phishing-resistant? Notes
Passkeys / security keys (WebAuthn) Yes Best option for both customers and staff
Authenticator app codes (TOTP) No Codes can be relayed by a real-time phishing page, but much stronger than passwords alone
Push approvals No Vulnerable to “fatigue” prompting unless number matching is used
Email one-time codes or links No Only as strong as the customer’s email account
SMS or voice codes No Vulnerable to SIM swap and interception; NIST classes telephone-network delivery as a “restricted” authenticator that needs an alternative on offer

SMS codes still stop most automated credential stuffing, so they are better than nothing for customer accounts. They should not be the strongest option you offer, and they should never protect your own staff or admin logins.

Rate limiting and bot detection

Credential stuffing is automated, so defences against automation do much of the work. SP 800-63B-4 requires verifiers to limit consecutive failed attempts on an account (to no more than 100) and suggests measures such as bot-detection challenges, increasing delays after failures and risk signals such as IP address, location and timing.

In practice, layer the following:

  • Per-account throttling with increasing delays, rather than hard lockouts that attackers can use to lock customers out deliberately.
  • Per-source limits on login, password-reset and sign-up endpoints, including your mobile app’s API, which is often left less protected than the website.
  • Bot management from your platform, CDN or web application firewall, applied to login and checkout.
  • Anomaly alerts for spikes in failed logins, many accounts tried from one source or one account tried from many.
  • Generic error messages that do not reveal whether an email address has an account, as the OWASP Authentication Cheat Sheet advises.

Session management

After login, the session token is what proves identity. OWASP’s Session Management Cheat Sheet covers the detail; the essentials for a shop are to set cookies with the Secure, HttpOnly and appropriate SameSite attributes, issue a new session identifier at login, apply idle and absolute timeouts, and invalidate sessions on logout and on password or email change.

Consider requiring the customer to re-authenticate before sensitive actions: changing email, password, delivery address or payment method, or redeeming a large gift-card balance. “Remember me” convenience is reasonable for browsing and checkout; it should not extend to changing who owns the account.

Account recovery is an attack surface

Recovery flows are often the weakest point. OWASP’s Forgot Password Cheat Sheet recommends consistent responses whether or not an account exists, single-use reset tokens that expire quickly, and no automatic login after reset. Additional points for retailers:

  1. Drop security questions. Mothers’ maiden names and first pets are often discoverable, and NIST no longer supports knowledge-based prompts of this kind.
  2. Notify on every change. Send an alert to the old email address when the email, password, phone number or passkeys change, with a clear way to report “this wasn’t me”.
  3. Delay high-risk changes. A short cooling-off period before a new email address can be used to reset the password gives a legitimate customer time to react.
  4. Script your support desk. Attackers phone or chat with customer service to change account details. Agents need a documented identity check that does not rely on information an attacker can easily find, such as an order number from a phishing email. If you use chatbots or automated support, make sure they cannot change account ownership without the same checks; see our guide to customer-service automation and human oversight.

Using OWASP ASVS as a checklist

The OWASP Application Security Verification Standard is a catalogue of testable security requirements for web applications. Version 5.0.0, published in May 2025, is the current stable release at the time of writing. It is organised in three levels of increasing rigour. A small retailer will not audit itself against the whole standard, but its authentication, session management and self-service recovery sections make a useful checklist when commissioning a custom build, choosing a plugin or briefing a developer. Asking an agency “does this meet the ASVS level 1 authentication requirements?” is a far better question than “is it secure?”

Our assessment

In our view, the biggest gains for most small retailers come from four changes that require little or no custom development: enable bot protection and rate limiting on login and reset; screen passwords against breached lists; offer passkeys where your platform supports them; and send notifications for every account change. These close off the commonest attacks without adding friction for honest customers.

Remember too that protecting accounts is a data-protection obligation, not just good practice. Under the GDPR and UK GDPR, a takeover that exposes personal data may be a reportable breach. Our guides to data security basics for online retailers and GDPR obligations for online businesses explain what follows.

What to do next

  1. Check your platform’s settings for bot protection, login rate limiting and breached-password detection, and turn them on.
  2. Remove composition rules and forced expiry from customer password policies; allow long, pasted passwords.
  3. Add passkey sign-in if supported, and make sure staff and admin accounts use phishing-resistant MFA.
  4. Review your password-reset flow and support-desk scripts against the OWASP recovery guidance.
  5. Enable “this wasn’t me” notifications for every change to email, password, phone and payment details.

Sources and further reading

  1. NIST SP 800-63B-4: Digital Identity Guidelines — Authentication and Authenticator Management — NIST
  2. SP 800-63B-4 publication record — NIST Computer Security Resource Center
  3. Authentication Cheat Sheet — OWASP
  4. Credential Stuffing Prevention Cheat Sheet — OWASP
  5. Forgot Password Cheat Sheet — OWASP
  6. Session Management Cheat Sheet — OWASP
  7. Application Security Verification Standard (ASVS) — OWASP
  8. Implementing Phishing-Resistant MFA (fact sheet) — CISA