Done: after sign-in (password and OAuth/passkey paths that exist) the cookie value differs from the one sent in, the earlier id is refused, and the cookie stays HttpOnly with SameSite set (Secure on https); a test per path fails against a fixed id. Suggested: mason.
Risks: Signing out other devices by mistake: rotate only the id presented, not the person's other sessions.
Read AGENTS.md and docs/PRINCIPLES.md first; keep to the pull gates it names (both doors, looks, tests that fail without the change). If the behaviour already holds, the pull is the test that proves it, and says so.
Done: after sign-in (password and OAuth/passkey paths that exist) the cookie value differs from the one sent in, the earlier id is refused, and the cookie stays HttpOnly with SameSite set (Secure on https); a test per path fails against a fixed id. Suggested: mason.
Risks: Signing out other devices by mistake: rotate only the id presented, not the person's other sessions.
Read AGENTS.md and docs/PRINCIPLES.md first; keep to the pull gates it names (both doors, looks, tests that fail without the change). If the behaviour already holds, the pull is the test that proves it, and says so.
Files: src/auth/, test/session-rotation.test.ts