Hacker News new | ask | show | jobs
by k__ 3624 days ago
Why not using one key per user? Then I would just have to invalidate this one user and not all of them.
1 comments

You don't know who the user is until you verified the integrity of the JWT. Verifiying the integrity requires the secret. Your solution adds the dependency: the secret requires the user. It is cyclic, unsolvable without breaking a constraint.

You could assume the username is correct, then get the secret, validate. But that sounds like something breakable.