JWT (Login Token)
JWT (JSON Web Token)
The 'ticket' you get when you log in. Show it with every request and the server knows who you are.
💡 It's a theme park wristband. Get checked once at the entrance, and after that you just show the band.
🤖 Say this to your AI
Explain how login works here. Tell me whether it uses session cookies or JWT, where the token is stored, and what happens when it expires, in simple words.
The key word is ‘JWT (JSON Web Token)’. Including it helps AI understand you much more precisely.
📌 Good to know
If you keep the token in localStorage, malicious code can steal it. Put it in an httpOnly cookie when you can.
When to use it
- When the AI mentions 'access token' or 'Bearer'
- When you're logged in but the API returns 401
- When an app and a server pass login status back and forth
Also called: jwt, token, access token, refresh token, bearer, bearer token, auth token, json web token