Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    J

    joepie91

    cryto.net/~joepie91 · Personal blog · on HN since 2014

    joepie91 is a developer who writes opinionated posts on web security, Node.js, JWT, MongoDB, and hosting and Bitcoin topics.

    Visit blogHN submissions
    SecurityWeb Development
    What HN says

    HN commenters cite his 'Stop using JWT for sessions' posts as a classic argument against JWT sessions, and link them in JWT security discussions.

    Stats for nerds
    72HN people shared it
    36linked in comments
    1.7Kstory points
    Jun 2026last shared
    2016people per year2026

    Top posts on HN

    1. 1
      Stop using JWT for sessions (2016)
      30 people · 533 points · first shared 2016 · 245 comments on HN
    2. 2
      CloudFlare, We Have a Problem
      6 people · 339 points · first shared 2016 · 163 comments on HN
    3. 3
      Never, ever, ever use MongoDB
      12 people · 285 points · first shared 2015 · 116 comments on HN
    4. 4
      Why Mt. Gox is full of shit
      3 people · 277 points · first shared 2014 · 134 comments on HN
    5. 5
      The Day We Do Nothing Of Consequence
      1 person · 112 points · first shared 2014 · 77 comments on HN
    6. 6
      The Great Bitcasa Purge
      1 person · 50 points · first shared 2014 · 11 comments on HN
    7. 7
      On Mozilla's forced SSL
      1 person · 46 points · first shared 2015 · 54 comments on HN
    8. 8
      Why not to use JWT, in 3 minutes
      21 people · 28 points · first shared 2016 · 6 comments on HN
    9. 9
      Reflections on NPM-gate, one day later
      1 person · 17 points · first shared 2016 · Discussion on HN
    10. 10
      The EU may have just banned the anonymous sale of online goods and services
      1 person · 10 points · first shared 2015 · 2 comments on HN

    What HN people wrote when they linked it

    • vova_hn2Jun 2026

      One of the articles that TFA links to [0] contains the following paragraphs:

      > And there are more security problems. Unlike sessions - which can be invalidated by the server whenever it feels like it - individual stateless JWT tokens cannot be invalidated. By design, they will be valid until they expire, no matter what happens. This means that you cannot, for example, invalidate the session of an attacker after detecting a compromise. You also cannot invalidate old sessions when a user changes their password.

      > You are essentially powerless, and cannot 'kill' a session without building complex (and stateful!) infrastructure to explicitly detect and reject them, defeating the entire point of using stateless JWT tokens to begin with.

      I'm not sure that this is entirely true. Typically, the total number of non-expired issued tokens is much higher than the number of invalidated unexpired tokens. Therefore, if you store only invalidated tokens and delete them when they get expired, you can significantly reduce the amount of required storage and the cost of lookup.

      Although, in any real application the performance gains will be minuscule (compared to the cost of, you know, everything else. Auth is just a small part) and probably not worth the extra complexity.

      [0] "Stop using JWT for sessions" - http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/

    • cmeacham98Jul 2021

      The ability to logout existing sessions (typically either via a manual user action or automatically upon changing/resetting their password) is a desirable feature in essentially all applications where user accounts can be compromised.

      You can kind of fake this by using a short-lived JWT and constantly refreshing it, but this:

      1. Massively increases server strain and bandwidth usage

      2. Has problems with users less reliable connections (they'll be randomly logged out all the time)

      3. Makes "Remember Me" style features impossible (unless you use a server-side store for that, which brings us back to it not being stateless)

      Here's a good graph on why $method to make JWTs work for sessions is bad: http://cryto.net/~joepie91/blog/2016/06/19/stop-using-jwt-for-sessions-part-2-why-your-solution-doesnt-work/ (note: for some reason the website doesn't support HTTPS :( )

    • kemonocodeOct 2019

      At this point I have yet to work on something that absolutely needs a NoSQL database so I may be a bit biased, but my general impression is they're a solution looking for a problem- or rather, the wrong solution to the wrong problem. I have used things like key-value stores such as memcached but it's also the kind of tools you don't use liberally unless you absolutely must. Perhaps a bit of obscurity isn't that bad of a thing after all.

      Doesn't help that people have been talking about the issues with NoSQL for quite a few years now [0]

      [0] http://cryto.net/~joepie91/blog/2015/07/19/why-you-should-never-ever-ever-use-mongodb/ (although I do wonder how much of these points still apply)

    • CiPHPerCoderAug 2018

      I've been fond of [1] and [2] for a more focused argument against JWT for sessions.

      The JOSE standards (of which JWT is a member) are error-prone and have had numerous critical security-affecting bugs due to how they were designed. [3]

      To remedy that, I proposed PASETO. [4]

      I still don't recommend PASETO for sessions, because of the arguments laid out in [1] and [2].

      [1] http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/

      [2] http://cryto.net/%7Ejoepie91/blog/2016/06/19/stop-using-jwt-for-sessions-part-2-why-your-solution-doesnt-work/

      [3] https://paragonie.com/blog/2017/03/jwt-json-web-tokens-is-bad-standard-that-everyone-should-avoid

      [4] https://paseto.io

    • timwisJan 2018

      A common security issue I've seen with uses of JWT doesn't have to do with JWT itself but how it's used by front-end developers. It's commonly stored in localStorage instead of an HttpOnly cookie, which creates a cross-site scripting vulnerability.

      More details here: http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/

      Shockingly, the advice I've seen to protect against this by folks like Auth0 is "keep your tokens expiration low" or not mention it at all.

      I don't imagine PAST gets around this, as it's more like misinformation around the storage mechanism, but I think it's worth mentioning in any "how to use" section about PAST or JWT.

    • br3w5Jul 2016

      Rather than just "JWT is awesome..." wouldn't it be more sensible and responsible to caveat this with some of the drawbacks?

      I read this article recently (http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/) that proposes not to use it for sessions but instead for the use cases listed at the end of the article. Follow-up article here http://cryto.net/~joepie91/blog/2016/06/19/stop-using-jwt-for-sessions-part-2-why-your-solution-doesnt-work/

      Also this https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/

    Related

    Paragon Initiative Enterprises Blogparagonie.com73 people

    JSON Web Tokens should be avoided

    Paragon Initiative Enterprises Blog
    Company · last shared 2026
    ircmaxellblog.ircmaxell.com74 people

    PHP Sucks But I Like It

    ircmaxell
    Personal · last shared 2023
    The HFT Guythehftguy.com75 people

    The most remarkable legacy system I have seen

    The HFT Guy
    Personal · last shared 2026
    jwzjwz.org880 people

    Watch a VC use my name to sell a con

    jwz
    Personal · last shared 2026
    Joe Stumpstu.mp17 people

    Joe Stump: Your city sucks (And so does mine)

    Joe Stump
    Personal · last shared 2016
    Joe Damatotimetobleed.com39 people

    American Express fails miserably at basic security

    Joe Damato
    Personal · last shared 2022
    Mitchell Hashimotomitchellh.com172 people

    Ghostty is now non-profit

    Mitchell Hashimoto
    Personal · last shared 2026
    Unlimited Noveltyunlimitednovelty.com42 people

    Node.js has jumped the shark

    Unlimited Novelty
    Personal · last shared 2023