Hey! I've followed the nextjs self service impleme...
# ory-network
r
Hey! I've followed the nextjs self service implementation (https://github.com/ory/kratos-selfservice-ui-react-nextjs) to integrate my nextjs site hosted on Vercel with Ory Cloud and works good on local, but when deploying to Vercel, the API routes seem to return a 404 error - I have made sure that the ORY_SDK_URL env var is properly set up, also tested changing the
dontUseTldForCookieDomain
value when creating the api handler and few other things without luck. Does someone has any idea why this is happening?
p
Hi @red-ice-83253 Did you modify anything in the example? The
.ory
path of the URL is hosted by the same application, essentially the nextjs example creates a mirror of the ory apis under your domain.
r
Hi @proud-plumber-24205, thanks for the reply! I did not change anything related to the api route, in the following screenshots you can see the content of the api route and that seems to be properly registered on vercel, but still always returns a 404 and thus can't even see the logs.
In the following screenshot can be seen how seems to be properly working during development
@proud-plumber-24205 For additional information, I have tryied it on a vercel preview environment using an Ory Cloud Dev project with ID ba8b60f4-9a9f-427f-b839-5b8bf9ee66df and also on the Vercel production environment using our Ory Professional project with ID 12dc65c8-8dde-4b4d-9371-7227bfca99e1, with the same results
Please, let me know if I can provide any other information that might help seeing where the issue can come from. I have really spent a lot of time trying to figure it out by myself and I have no clue where else to look at.