| Stop Using JWTs(gist.github.com) | |
| 457 points by dzonga 23 hours ago | 266 comments | |
tl;dr: JWTs are unsuitable for user sessions: the spec is designed for short-lived (~5 min) tokens, "stateless" auth isn't practically secure, and the specification itself has known flaws distrusted by security experts. Regular cookie-based sessions are simpler, more flexible, and purpose-built for keeping users logged in. If you genuinely need signed short-lived tokens, use PASETO instead—and never store auth credentials in localStorage. | |
HN Discussion:
| |