›Before shipping a new authentication flow or identity provider integration
›After any changes to session handling, token storage, or cookie configuration
›When onboarding a new OAuth provider (Google, GitHub, Microsoft)
›As part of a security review of a login surface
›During regression testing after framework or library upgrades that touch auth middleware
Authentication is the highest-risk surface in any application. A bug in signup duplication protection, session invalidation, or password reset token handling can expose user accounts at scale. This checklist covers the full auth lifecycle: registration, login, session management, validation, password rules and enforcement, reset and recovery flows, email verification, social OAuth, MFA basics, and security hardening against brute-force, timing attacks, and session fixation.
0/36
User Registration (Signup)
0/6
Verify the registration flow creates accounts correctly, enforces constraints, and handles duplicates safely.
Login Flow & Session Management
0/6
Confirm login grants access correctly, sessions are properly scoped, and logout fully terminates access.
Input Validation & Error Handling
0/5
Verify that all fields validate server-side, errors are specific, and validation cannot be bypassed via the API.
Password Rules & Strength Enforcement
0/5
Confirm the server enforces password policies independently of the frontend, and that policies are sensible.
Password Reset & Recovery
0/5
Verify the password reset flow is secure: tokens are single-use, expire on schedule, and do not reveal user existence.
Verify the login surface is hardened against credential-stuffing, timing attacks, and session fixation.
Common Bugs
Login redirects to the login page itself (200 on /login after submit)
The POST /login handler returns 200 with a body instead of a 302 redirect. The browser stays on /login, and client-side routing never fires. The user appears stuck. Always use a redirect response (302/303) after a successful POST login.
Password reset token reusable after first use
The reset token is not invalidated in the database after the first successful password change. An attacker who intercepts or finds the reset email can use the same link again to take over the account. Always mark tokens as used immediately after the password change is committed.
Session cookie missing HttpOnly flag — readable by JavaScript
The session cookie is set without HttpOnly, making it accessible via document.cookie in any JavaScript context on the same origin. A single XSS vulnerability anywhere on the site becomes an immediate account-takeover vector.
Account enumeration via different error messages for 'user not found' vs 'wrong password'
The login endpoint returns 'No account found with that email' for nonexistent users and 'Incorrect password' for wrong credentials. Attackers use this to build a list of valid registered emails by observing which message they receive.
Old sessions remain valid after password change or logout
The logout action only clears the client-side cookie but does not invalidate the server-side session record. A previously captured session token continues to work indefinitely. Always implement server-side session revocation on logout and after password changes.
OAuth state parameter missing — CSRF on the OAuth callback
The OAuth authorization URL does not include a state parameter, or the callback endpoint does not validate it. An attacker can craft a callback URL that links a victim's app account to the attacker's social account, granting them access.
cy.session() makes auth flow reuse fast in test suites. cy.intercept() lets you test error states (wrong password, network failure) without real credentials.
storageState API saves and restores authenticated sessions across tests. API requests via APIRequestContext let you test session invalidation at the HTTP layer.