Add Authentication to .NET MAUI Apps with Auth0

Learn how to authenticate users of your .NET MAUI application using Auth0.
Read more…

:writing_hand:t2: Brought to you by @andrea.chiarelli

What’s up Devs! How did you like this post? Please share any comments or feedback with us on this thread :thought_balloon:

The tutorial is completely missing the part where you use the access token to call your API.

The access token in your tutorial does not work against API because the access token is missing payload because the IdentityModel library for some reason does not implement “audience” parameter at all, it’s not possible to specify audience in the OidcOptions.

1 Like

Fortunately the fix is easy. It would be great if you included an instruction that to call your API you have to send a request with audience set like this.

await oidcClient.LoginAsync(new LoginRequest()
    FrontChannelExtraParameters = new Parameters(new Dictionary<string,string>()
        {"audience", "YourAPIIdentifier"}
1 Like

Hey @miroslav.bartl,
Thank you for your feedback. Actually, the tutorial focused on authentication. For this reason the API call was not included

1 Like

Thanks for your suggestion! :raised_hands:

1 Like