C
C#7mo ago
ibby

SignInAsync Set-Cookie header not working?

Frontend: localhost:3000
Backend api: localhost:61927
Frontend: localhost:3000
Backend api: localhost:61927
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 wrong
No description
4 Replies
Jimmacle
Jimmacle7mo ago
i ran into this recently, iirc it's a specific combination of browser, CORS, and localhost that prevents cross-origin cookie setting
Jimmacle
Jimmacle7mo ago
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.
ibby
ibbyOP7mo ago
I had to set credentials: "include" in the fetch call
Jimmacle
Jimmacle7mo ago
:PepeHmmm: i should try that on my end too
Want results from more Discord servers?
Add your server