In this article about SPA authorization with session cookies and auth tokens, I don't know how to implement the crux:When a Single Page App loads it can read the cookies (via JavaScript), grab the authentication token, and then manually send that token on each request through a custom HTTP header.That's really cool. If it can do that it can also add the cookie's user data to the redux store and I can render based on that. But I'm stuck at this part:When a Single Page App loads it can read the cookies (via JavaScript)How is this done?EDIT: I'm also curious to make sure this is handled upon refresh.
Submitted April 06, 2017 at 04:43PM by L000
No comments:
Post a Comment