Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I suppose, but generally the solution is a refresh token with the JWT having a very short expiry to the point where adding a timestamp would be superfluous.

IMO the only flexible way is a denylist of tokens or JTI which adds the burden of more infrastructure.

My take is to use an opaque token unless you are using OAuth and paying someone else for all these extra capabilities, at which point things become easy.

ex. If you are using Firebase Auth or Auth0, they manage the token revocation for you so the problem sort of melts away and you are left with only benefits of JWT. Just have to blacklist the JTI claim and it'll automatically be denied in the future.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: