⚡ Quick Architecture Cheat Sheet (For Fast Revision)
If you are using this post to refresh your memory, here is the core token blueprint:
Token Type Stored In Lifetime (Recommended) Primary Purpose
Access Token HTTP-Only Cookie / Auth Header 15 Minutes Authenticating short-lived protected route requests
Refresh Token Database & HTTP-Only Cookie 7 to 10 Days Requesting a brand new Access Token when it expires
The Token Lifecycle Flow
[Client] -------------- 1. Send Login Credentials ---------------> [Backend] [Client] <-------- 2. Set Access & Refresh Cookies --------------- [Backend] (Saves Refresh Token to DB)
[Client] -------- 3.…