Auth0 callback only works in development for my Angular 2 (4) app

When I test my Angular 4 login with Auth0 in development mode with localhost:4000/callback as redirectUri for my auth0.WebAuth it works fine.

However, when I go to production, with redirectUri = https://example.com/my/app/callback then I get the following error from the console log

GET https://example.com/my/app/callback 404 (Not Found)

Any ideas?

You need to ensure that your callback route is defined and available in your production environment. It would also be worth checking the Logs in Auth0 to see if any other errors were thrown.

Is the callback route any different in the production environment other than replacing localhost with example.com?
Also, the logs looks to be “Success login”, so it might not be a problem with the auth, but with my app.

My response was aimed at your application - you need to make sure that your callback route is working in your application, in your production environment.

After some testing and googling I have landed on this being a server issue for routing and deep linking. Please see this stackoverflow for details: