you do session management with cookies in SPA!?
I know I can Google it. And I did. And I found a few articles.
But I still don't understand. Once you make an API call and that API sets a cookie.
YOUR SPA gets the response right? Not the browser!? Right?
So how are you able to make the browser set that cookie?
why use cookies?
Well, if you use jwt where are you going to store it? Local storage?
Well, see. I would like to agree with that. But I did a lot of research seeemes like they're all using httpOnly cookie even for JWT Because it is possible to run javascript code on local storage... Let me reference an article.
https://hasura.io/blog/best-practices-of-using-jwt-with-graphql/
Anyone else wants to join the discussion? My main issue is, how do SPAs handle cookies? And have you done session management with cookies for a SPA?
Server sends set cookie header and your code can't access the cookie but can use it
is the cookie set in the browser or not?
Обсуждают сегодня