I am new using auth0 I need to show a demo to my clients using auth0 to solve this problem:
I need to access from different apps(IOS,Android, UWP, desktop) to my backend (Asp.Net
Web Api) using social providers like facebook (for now and later twitter or another) all the users must be stored in my custom database.
I configured my custom database now I can login, verify, create etc…
I made some rules to enrich my login info.
I created a new API following this tutorial:
Auth0 ASP.NET Web API (OWIN) SDK Quickstarts: Authorization
I can do the test successfully using PostMan to my backend.
I am using RS256 algorithm
I created a new UWP app I installed the nuget package
Auth0 OIDC Client for Universal Windows Platform (UWP) applications
I used the client Id of my new client(myapi-test) and the secret key
var client = new Auth0Client(new Auth0ClientOptions
Domain = “xxx.auth0.com”,
ClientId = “xxxxxxxx”,
var loginResult = await client.LoginAsync();
I could see in the error log I need to add to the client myapi-test(no interactive) the callback
because I got this error in the log:
Callback URL mismatch. https://xxx.auth0.com/mobile is not in the list of allowed callback URLs
Now I run again my UWP and I can see the login page I used facebook and I got my token.
I guess with this token I can make request to my backend(Web Api) but always I get the error
"message": "Authorization has been denied for this request."
like I said I am new using Auth0 someone can help me? I want to use the token that I get from my login page of my mobile apps to make requests to my Backend.
I don’t know if I am missing something.