Posts tagged “jwt”

  1. Sessions or JWTs: which should you use to keep users signed in?

    Two good ideas for different jobs. For a web app with its own backend, server-side sessions are simpler and safer: a random cookie, instant revocation, nothing sensitive in the browser. JWTs earn their place between services and across organisations, where checking a signature beats a database…

    · 5 min read · Security

  2. Access tokens and refresh tokens: why two, where do they live, and what happens when one leaks?

    Why two tokens: a short-lived access token shown to every API, and a longer-lived refresh token shown only to the auth server and rotated, so reusing a stolen one raises an alarm. Diagrams of the flows, where to store each token on web, mobile and server, and what an attacker gets from each kind…

    · 7 min read · Security