session cookie
The cookie that proves a user is signed in, carrying a session ID or a signed or encrypted token.
A stolen session cookie lets an attacker use the account without knowing the password.
In more detail
Anyone who steals it can act as the user. Set HttpOnly, Secure and SameSite, keep its lifetime short and sign or encrypt its contents.
Related terms
- session — A record the server keeps about a logged-in caller, found on each request through a handle the client presents, usually in a cookie.
- HttpOnly — A cookie attribute that stops scripts running in the page from reading the cookie, while the browser still sends it on requests.
- signed cookie — A cookie whose value carries a signature, such as an HMAC, so the server can detect any change made by the client.
Taught in
- Edge Middleware: Auth Verification & Route Matchers — Next.js 15 & Modern App Router Architecture
- Session Management: Secure Cookies & Token Validation — Next.js 15 & Modern App Router Architecture