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.
Phind came in clutch https://www.phind.com/search?cache=oh11nkp75o3qrvnnls9r9aht
I had to set
credentials: "include"
in the fetch call
I thought that was only for including a cookie for outbound requests:PepeHmmm:
i should try that on my end too