I’m trying to integrate ASP.NET Core application with Auth0.
Auth0.AspNetCore.Authentication NuGet package following tutorial documentation by @andrea.chiarelli .
It works fine when I’m trying locally using https://localhost URL.
When I add a Nginx reverse proxy in front of the application several things happen.
If I try to terminate https on NGINX (application runs as http) the redirect URL constructed by
This can be work around by modifying the URL in props or running the service itself with https.
After I login I get “502 Bad Gateway” from Nginx.
I tried adding ForwardedHeaders on startup, but it didn’t help.
Did someone else face this issue? It should be common as many applications run behind Nginx reverse proxy in production.