Hey team, We are currently doing our first product...
# ory-network
s
Hey team, We are currently doing our first production deployment šŸŽ‰ but are facing an issue: • We use a social login provider (keycloak) • The Ory login flow as been working with a local dev setup • On the production instance the login is successful ā—¦ The cookies get set and we are redirected to the page we wanted • But then all the subsequent calls to .toSession fail with 401 and we get stuck in a redirect loop login <> redirect page Does anyone have any clue what we could be missing? Thank you and have a good day :)
f
that sounds strange, thanks for sharing - can you confirm that subsequent requests (toSession()) send the cookie correctly?
r
The
toSession
call is done server-side. We pass the cookie from the client. We added a log to see that the cookie is there. The same code runs in the local setup using the Ory tunnel and works fine. For us it's really hard to even get started debugging this further since the rest is outside of our control. Any ideas of what we can try or how others debugged issues around this are appreciated šŸ™‚
We found the issue. Took 5 people to be involved over the span of 2 days now šŸ™ˆ We set the base path to the ory project's url. Now we changed it to our product's url and it works. The only error we could see the whole time was an Axios 401. Would be very helpful to have some more context when running into such fundamental issue. Just leaving this here as an update šŸ™‚
f
thanks so much for sharing this, appreciate it a lot
is that because the cookie was ignored because it wasn't for the domain or something alike?
r
Sounds reasonable. From our side we can only see the 401 which Ory Cloud returned us. No further info.