SignInAsync Set-Cookie header not working?
Using
fetch()
to hit a sign in endpoint that calls HttpContext.SignInAsync
, it adds the token to Set-Cookie header but the cookie never gets set on my frontend? I've already configured CORS and I'm getting no CORS errors. Not sure whats wrong4 Replies
i ran into this recently, iirc it's a specific combination of browser, CORS, and localhost that prevents cross-origin cookie setting
Medium
Cross-Site Cookies Will Now Be Rejected on localhost Because of Sam...
If you’re looking to building a project in which you would be serving cross-site cookies, here’s what you need to know.
I had to set
credentials: "include"
in the fetch call:PepeHmmm:
i should try that on my end too