Sessions vs Stateless Tokens
When JWT fits an API better than cookies.
Two Ways to Remember Users
HTTP forgets you between requests. To keep someone logged in, you either store a session on the server or hand the client a signed token.
How Sessions Work
With a session, the server keeps your login state and gives the browser a tiny cookie holding only a session id. Every request, the server looks that id up. 🍪
All lessons in this course
- Sessions vs Stateless Tokens
- Issue Access Tokens on Login
- Protect Endpoints with jwt_required
- Refresh Tokens and Expiry