Hi. The recovery page wasn't working, I saw that ...
# ory-network
f
Hi. The recovery page wasn't working, I saw that this option was disabled in the ory console (https://console.ory.sh/projects/d14998bb-0003-4884-9d89-9ce215b82a85/recovery). I activated it and it worked normally, but not in the production environment, perfect in the development environment, but in the production environment it says "Page not found 404". Can anyone tell me the reason for this error in the production environment, since nothing has been changed in the code, just the activation in the ory console? #C02MR4DEEGH
m
Hello @fast-pizza-10456 I tried it for the project ID you shared and the recovery is working for me. What do you mean by “production environment” ? A custom UI?
f
I'm using Custom UI with Ory Elements (https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-ory-elements) with react-spa. The strange thing is that I haven't had to configure any of the routes that already work (/login, /settings ...) in the ory console. But I have to configure /recovery?
p
hmm no if you are navigating directly to the UI then you don't need to configure anything since it's an SPA. Could you explain the steps and the error case for the recovery flow? 1. Is recovery enabled on the project? 2. What happens when you navigate to the recovery page (your UI)?
f
Researching further, I realized that my routes are working on https://auth.newtesc.com/ and not on https://login.newtesc.com/. Example: https://auth.newtesc.com/ui/recovery works but https://login.newtesc.com/ui/recovery doesn't. https://auth.newtesc.com/ is the route for making apis calls, it replaces https://wonderful-tesla-tn9gq31z4b.projects.oryapis.com/ https://login.newtesc.com/ is the route of my application, of my ui. I've already put https://login.newtesc.com/ in the custom route field, but it still doesn't work.
Answer. 1 - Yes, recovery is enabled in the project. 2 - When browsing the recovery page of my UI "Page not found".
https://login.newtesc.com/recovery não funcionado, sendo que o resto da minha aplicação está funcionando em https://login.newtesc.com/
p
Is this SSR? also the environment variable for the SDK should point to your custom domain
if you are redirecting the user instead you need to add your ui URL inside the Custom UI screen on the console.
f
No, it's a spa.
p
I don't see any xhr calls on this domain. Is the spa hosted at login.newtesc.com?
f
That's right, the calls are being made to https://auth.newtesc.com which is the cname for https://wonderful-tesla-tn9gq31z4b.projects.oryapis.com
p
Okay so if i go to this URL I can see on the front page you have an xhr call to Ory on the CNAME which returns a 200. But i think you don't have a route for recovery registered in netlify or something, since this 404 isn't an Ory error.
You can also see there is no xhr call
f
Hi @proud-plumber-24205. I posted the question on #C02MR4DEEGH and on https://github.com/orgs/ory/discussions/80. I think it's better organized.
p
I have transferred the discussion to ory/network https://github.com/ory/network/discussions/354