react-redux-starter-kit
react-redux-starter-kit copied to clipboard
Setting cookies for different hosts
Hi
I host my API on port 4000 and client-side app on 3000
I set a cookie to from the API to authenticate future requests, but it does not get saved in the browser on 3000.
Any ideas on how to set cookies with the starter kit?
Hi, this is a security problem related with cookies domain scoping.
Look at this documentation: http://visionmedia.github.io/superagent/#cors
I recommend js-cookie.
You receive the auth token and save it with Cookies.set('authToken', authToken)
.
To get it use Cookies.get('authToken')
.