Hi, I am looking for some help in regards to this ...
# ory-network
c
Hi, I am looking for some help in regards to this discussion on github: https://github.com/orgs/ory/discussions/134 What I want is to be able to connect and authenticate on a locally running vite-app via
staging
-project in ory with a custom domain of
<http://auth.my-domain.com|auth.my-domain.com>
. When I use a tunnel
ory tunnel --dev --project <my-project-id>
it works as expected. But when I replace the default UI urls given by ory with sub domain of
<http://auth.my-domain.com|auth.my-domain.com>
I get a CORS error. Please let me know if I have something misconfigured in ory network
s
Did you configure CORS in the first place? https://www.ory.sh/docs/guides/cors
c
The OAuth 2 client i use on my locally running vite app has allowed CORS origin from
<http://auth.my-domain.com|auth.my-domain.com>
s
I think you might still need to enable CORS globally though
c
When you say CORS enable globally, what do you mean specifically?
aaah, let me clarify, I dont get a CORS error, I get CSRF error when I use custom domain for my ui
reject_reason: "The HTTP Cookie Header was set and a CSRF token was sent but they do not match. We recommend deleting all cookies for this domain and retrying the flow."