Replies: 1 comment
-
Hello @vputz
Make sure that the Origin header in your request matches exactly one of the allowed origins. Browsers are strict about this matching. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ok, Ory in local on-machine kubernetes cluster via Helm chart, and I've tried versions 1.1.0 and 1.2.0 of the container. Kratos is configured with (obtained with
kubectl describe cm kratos-config
so this does seem to be what the container is doing)I can initiate a login flow with
curl -X GET -H "Accept: application/json" http://localhost:4433/self-service/login/browser | jq
and via my SPA; all this is good. But I can't complete the login flow without including the csrf token, and I can't include the csrf token without including the correct cookie, and it seems to do that I need to requestwith-credentials: true
... and at that point my browser gets angry:Attempting to simulate a CORS preflight by asking for options looks like this:
And indeed I see no headers. I'm more new to CSRF and CORS than I probably should be, but when I've done searches it looks like most are "configure kratos to do cors", and I feel like that should be done? (it complains if I misspell any of the keys, so I think it is trying to use that config...)
Apologies for sounding so confused, but I've wrestled with this for some time now and am very confused.
Beta Was this translation helpful? Give feedback.
All reactions