Comment

Comment by asymptotically2

Slightly OT but why should I choose a JWT over creating some opaque token (random bytes) and storing that in a database mapping it to a user's ID?

It seems like people create short lived JWTs and then pass some opaque token to an auth endpoint to get a new JWT signed whenever the old one expires, or they store the JWTs in a database so that they can be revoked, making me question their usefulness.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton