Hi, I am currently trying to setup ory for my Reac...
# ory-network
a
Hi, I am currently trying to setup ory for my React SPA using Vite. I have a context file that is wrapping my application. I am running the ory tunnel with
ory tunnel --project <slug-id> <http://localhost:5173>
. The flow directs me to login and then redirects back to my application, but the whoami request keeps getting 401 and therefore not getting a session Any advice?
m
Hello @alert-oyster-16871 could be multiple things 🤔 • Is the session cookie being sent with your request? • is http://localhost:5173 added to allowed CORS origins? • do you always use http://localhost:5173 everywhere? it must not be mixed up with 127.0.0.1:5173! • All requests from your SPA to Ory should go through the Ory Tunnel (
<http://localhost:4000>
), not directly to the Ory Network cloud endpoint.