Not able to login in production


I followed the quick start of next.js and my login is working on dev mode on http://localhost:3000/api/auth/login.

But when I deploy my app to my server, build and start it there with yarn start --port 3034, I get forwarded to http://localhost:3000/api/auth/callback?code=......

In the application settings I have the following callback URLs:,http://localhost:3034/api/auth/callback,http://localhost:3000/api/auth/callback

When I remove just the http://localhost:3000/api/auth/callback and I access I get a default Auth0 error page:

Oops!, something went wrong

Callback URL mismatch.
The provided redirect_uri is not in the list of allowed callback URLs.

But it is in the list. What is wrong here?

Btw: I’m using NGINX and reverse proxy the domain to the port :3034.


I want to add, that when I copy and paste the to the browser, I get state missing from the response, so I’d say the URL is correct.