News for hackers. Stuff that matters.
Re:Stop using JSON Web Tokens for user sessions by Moneysac on Saturday November 25, 2023 @03:46PM (#38416545)
In a single page application it is necessary to access the JWT with JavaScript. Thats why it is so common to save it in the code directly or in the local storage. It is dangerous though, since a XSS vulnerability can be used to access the JWT. This would be totally different with a cookie that is stored with HttpOnly.
Re:Stop using JSON Web Tokens for user sessions by Aldipower on Sunday November 26, 2023 @05:28AM (#38420576)
No, why? It is very often not necessary to make this accessible to JavaScript, except you are working with refresh tokens. But this is mostly not necessary and overused.