I uses auth0 to connect to my application.
It works well localy but when i try to use it from the web I have a problem.
I uses the ASP.Net Core sample provided in the documentation (Auth0 ASP.NET Core MVC SDK Quickstarts: Login), and I have configured the login, logout, and the callBack URL properly in auth0.
My problem is that when I access to my service by is public adress and I hit the Login button, the url constructed by the service to call auth0.com indicates the local address in the “redirect_uri” section and not the public one.
Of course, this didn’t work because the local address isn’t globaly accessible…
My question is : where and how can I specified the right URL to use in the service ?
Here is a screenshot of my service based on the example from auth0 documentation. It runs on a IIS server, and is accessible from a public domain name (wich I overwrite here for confidentiality raisons).
How are you setting your redirect URI? This should be a parameter you send with your request to the /authorize endpoint, and can be configured to whatever you prefer.
Showing us a code sample of your Auth0 implementation could help.
The problem is I don’t set it : it’s set automatically by the Web Service.
My application is 98% like the sample app proposed on the help (Auth0 ASP.NET Core MVC SDK Quickstarts: Login) but to be sure I do nothing wrong I just send you by private message my code.
As you will see, I never set the redirect URL, and therefore I have no idea how to do it to resolve my problem.
This redirect URL is generated by the Microsoft.AspNetCore.Authentication.OpenIdConnect library used in .NET apps. Usually you’d want to have the redirect URL in the same domain as the app.
However, if the problem is that the app is not aware of the domain because the request come through a load balancer etc, they may need to use the x-forwarded-for headers nginx - AspNetCore Azure AD Connect Callback URL is http, not https - Stack Overflow
Thank you and your team for your answer.
I’m currently checking the links you provide, and will come back to tell if I managed to resolve my problem.
Problem solved !
In fact, it wasn’t a problem with the web service but a configuration on IIS that wasn’t correct… I found the solution thanks to the links you sent me, thanks a lot.