The long token string you get after logging in is usually a JWT. Here's what's inside and how to keep it safe.
Three parts
The three dot-separated parts are the header (algorithm), the payload (contents like the user ID and expiry) and the signature. The first two are only Base64URL-encoded, so anyone can read them.
Expiry times
exp is when the token expires, iat when it was issued and nbf when it becomes usable — all Unix times in seconds. The shorter the lifetime, the smaller the damage if a token leaks.
Common security mistakes
Putting passwords or personal data in the payload
Servers accepting tokens whose alg was changed to none
Signing HS256 with a short, common secret (like secret)