Re:Why to not use JWT (2021)
by stefs on Thursday September 29, 2022 @10:54AM
(#33021574)
if someone is dumb enough to use guessable session ids (instead of, e.g. uuids), then they'd be also dumb enough to use guessable bearer tokens.
[ Parent
| on HN ]
Re:Why to not use JWT (2021)
by noisem4ker on Friday September 30, 2022 @06:24AM
(#33033104)
To prevent guessing, the session ID must be cryptographically signed (and possibly encrypted) by the server, with the signature appended to it. Upon receiving it back from the client, the server needs to check it wasn't tampered with. This guarantees an attacker may not simply generate random session IDs until someone else's is found and their session is hijacked, because they wouldn't know how to fake the signature.