Cookies and sessions hold boundaries
A cookie is a browser storage and transport mechanism. A server-side session is one application design that uses a cookie value to locate stored state. Keeping those responsibilities separate makes login, expiry, and logout testable. This article follows an opaque session identifier, rather than repeating the host, path, or SameSite matching rules. ...