News for hackers. Stuff that matters.
Re:Should I Use jwts For Authentication Tokens? by littlecranky67 on Tuesday May 28, 2024 @09:31AM (#40500573)
Often overlooked middle-ground that vastly simplifies your revocation logic: Just have a single field "not-issued-before" timestamp assigned to each user account. Instead of revoking a single token, you have a "log out from all devices" logic - i.e. you revoke all tokens at once based on their "iat" claim (issued at). No need for revocation lists alltogether, you just make sure any tokens "iat" is never before the "not-issued-before" associated with the user. Sure, this is not as perfect UX as being able to revoke individual tokens, but token revocation in generall is something only a fraction of your uses is ever going to need.
Re:Should I Use jwts For Authentication Tokens? by withinboredom on Tuesday May 28, 2024 @09:34AM (#40500601)
Yeah, this works very well. A nice "log me out of everywhere, including this device" link is often all you need on the settings page.

It also makes e2e testing very easy since you should be logged out after pushing that button.