I have my app with nextjs and supabase deployed on render.com. All works as expected in local, but in prod, supabase redirects to http://localhost:10000 after login. Actually all my auth routes after supabase interaction are wrongly redirected.
I saw a PORT variable in render.com which is settled to 10000, but removing it causes no changes, as it is apparently a default variable.
Some more specifics:
- sign-in route in nexts:
- The marked console.log above, logs this on my render.com server when on production
- Authentications/URL Configuration in Supabase dashboard:
- My middleware.ts file:
- the req of the middleware on the server:
- the res of the middleware on the server:
I very much appreciate any help on this, thanks!
I tried: signing in in production. I expect: to be redirected to https://circulart-statistics.onrender.com/clients. Instead I am redirected to http://localhost:10000/clients. Same happens for any other auth-redirects from supabase.
There is apparently some issues at render.com running the version I am using of Next JS (v13.5.4) and node 18.18.2.
It worked perfectly when I tried deploying into vercel.