| ▲ | tracker1 6 hours ago | ||||||||||||||||
If your talking about a browser context, where the authority is separate from the requesting body, then expiring even at 30s is excessive for user context, let alone every 1s or every request... you're effectively then inflating every single API request into 2 requests... one for a new token, then another to the API being called. This is irresponsible for not much gain in a user-facing context. | |||||||||||||||||
| ▲ | hparadiz 6 hours ago | parent [-] | ||||||||||||||||
You should not be using them for user contexts at all. The cookie should be the session token and the sessions should be stored on the server side where you can simply delete them and the user's login becomes invalid. Using JWTs for this use case is just plain wrong. | |||||||||||||||||
| |||||||||||||||||