Currently we are trying to implement universal login with a UWP application using the Auth0.OidcClient.UWP SDK (v3.1.2) and referencing the quick start guide, and running into some issues with getting a 404 Not Found response back after hitting the auth0/authorize end point.
Here is the code that is called when clicking the login button in the application:
This is the code for displaying the result that is being returned:
The error message we are getting in loginResult.Error is NotFound and not really sure why this is happening. Below are some things to point out that we have noticed or tried:
We did confirm that we are being directed to the correct Application and Connection in Auth0
We did confirm that we have added the correct SID values in the Callback URL and Logout URL in the application per the quick start guide in Auth0 settings
The Auth0 application setup is using OIDC Conformant and the JWT signature algorithm is set to RS256
If we login with invalid credentials on the Universal login page we do get a log in Auth0 logs stating this BUT if we login with the correct credentials then no logs are showing in Auth0 logs for that event and NotFound is returned in the display results
We did attempt to use Fiddler to intercept the HTTPS calls but nothing more was shown besides the 404 Not Found error message we are seeing in loginResult.Error
We did find that we had to hard code the SID in the redirectUri value in order for it to send the correct callback URL to Auth0. If we did not hard code this value it was defaulting to a URL with the domain and /mobile at the end and not sure if this is by default or not.
Thanks for your response! Unfortunately that is all the error information that I could find both in loginResult.Error and also using fiddler to see if I could get more error information.
I will DM you my tenant name and I am hopeful you can see more on your side for us.
What value for connection? A nonexistent connection is something that can throw a 404.
Interesting, yea I pass connection (which in this case we have a environment setup under my name of “exampleA”) into LoginAsync method:
Should this also be in clientOptions object or somewhere else?
Can you try omitting it completely and see if that works? It is optional so that will rule it out if we still get a 404.
If that solves it, then try in the client options and see if you still get it.
I removed the connection value out of LoginAsync and still received a 404 NotFound error. I did notice again that I got a log for successful logout in the Auth0 logs but I have been getting those before as well.
Also I will add if we do not pass the connection value of “exampleA” into LoginAsync then it defaults to our “exampleB” environment.
Could it be the clientID? Can you make sure it is properly entered as well?
Yea I triple checked that the clientID is correct and matches what is in the Auth0 application settings. I thought that originally as well.
They suggested trying this method of finding the redirect URI mentioned in the quickstart:
Alternatively - or if you have not associated your application with the Store yet - you can obtain the value by calling the Windows.Security.Authentication.Web.WebAuthenticationBroker.GetCurrentApplicationCallbackUri() method. So for example, in the OnLaunched method of your application, you can add the following line of code: