# Staying Signed In

Staying Signed In: Sessions and Cookies, Tokens: Signing In with a JWT.

Updated: November 19, 2026

1. [Sessions and Cookies](https://www.ask-codey.com/lessons/node-auth-sessions-and-cookies) (Journeyman): A session keeps a student signed in the way a coat check does, with the record on the server and only a random ticket in the browser's cookie, and express-session sets it up with the HttpOnly, Secure and SameSite flags; it's the simpler choice for one website on its own server.
2. [Tokens: Signing In with a JWT](https://www.ask-codey.com/lessons/node-auth-tokens-jwt) (Journeyman): A JWT is a signed token the server hands out at sign-in and each request sends back in an Authorization Bearer header; jsonwebtoken's sign and verify make and check it, anyone can read its payload, and it fits APIs that apps and other servers call.

Source: https://www.ask-codey.com/courses/nodejs-in-depth/topics/node-auth-staying-signed-in
