Fixing Session Fixation in a Remember Me Cookie

Rotating session IDs in an e-commerce API

The scenario

Our e‑commerce API was built on a stateless REST layer that delegated authentication to a central identity service. The API accepted a short‑lived bearer token (JWT) and, for convenience, exposed a “Remember Me” feature that let users stay logged in across browser restarts. The implementation was simple: the client stored a cookie named REMEMBER_ME that contained a signed, encrypted token. When the browser sent the cookie back, the API would issue a new JWT and refresh the cookie.

[Read More]