Re:Stop using JSON Web Tokens for user sessions
by seandoe on Saturday November 25, 2023 @09:07PM
(#38418587)
> In a single page application you have to access the JWTs with JavaScript.
Who says you _have_ to? You could set a jwt as an httponly cookie and use it to exclusively validate API requests in your backend.
What I am trying to say here is that JWTs used in single page applications are dangerous because you have no layer of protection against XSS attacks.