question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fail to save Set-cookies data to browser

See original GitHub issue

I am using Chrome 48 and found that it is not able to save the set-cookies details into the browser and therefore I am not able to use isomorphic-fetch to do any cookies/ login related api request. I have been calling an api by code like this: fetch("/accounts/register/", { method: 'post', headers: { "X-CSRFToken": CSRF.getToken(), "Accept": 'application/json', "Content-Type": 'application/json' }, body: JSON.stringify(payload) }).then(response => { if (response.status == 302) { dispatch(receiveRegistration()) return Promise.reject() } else { return response } }).then(response => response.json().then(json => ({json, response})) ).then(({ json, response }) => { if (!response.ok) { dispatch(failRegistration(json)) } else { dispatch(receiveRegistration()) } })

Please kindly advise if I have been using isomorphic-fetch wrongly or this is actually caused by the underlying “fetch polyfilly” library.

Thanks a lot.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:15

github_iconTop GitHub Comments

4reactions
luckydrqcommented, Mar 24, 2016

It’s weird. In your case in https://github.com/koajs/koa/issues/689, the requests are all belong to the same domain which is 9.xiaojukeji.com, i think {credentials: 'same-origin'} is not necessary. Did i miss something?

2reactions
grillermocommented, Jan 20, 2017

My call to fetch endeup like this fetch(url, {credentials: ‘same-origin’}) And it worked for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cookies not saved in the browser - python - Stack Overflow
The domain for the cookie was set to the loopback address (127.0.0.1). In angular, I was calling the set-cookie endpoint using 'localhost' ...
Read more >
Cookies headers are present but Cookies are not stored in ...
I recevie Cookie header: Set-Cookie: name=value; expires=Sun, ... Cookies headers are present but Cookies are not stored in browser #1553.
Read more >
Turn cookies on or off - Computer - Google Account Help
Cookies save browsing information to make your online experience easier. Discover how to turn cookies on or off while using the Google Chrome...
Read more >
Set-Cookie - HTTP - MDN Web Docs
The Set-Cookie HTTP response header is used to send a cookie from the server to the user agent, so that the user agent...
Read more >
Third-Party Cookie Error - Tableau Help
Tableau Server on Windows Help · Clear Saved Data Connection Passwords · Synchronize All Active Directory Groups on the Server · Set the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found