Add Authentication to .NET MAUI Apps with Auth0

Hi @gnanapriyasvmn ,
Welcome to the Auth0 Community! :wave:

I’d like to clarify that this article is focused on adding user authentication to the MAUI app and showing the user profile. It doesn’t include access token requests.
Bear in mind that the code shown in the article is just an example of how you can add authentication to a .NET MAUI application. It is not production-ready nor complete.

That said, I’m not sure to understand what you mean by “server id” and why you need the “discovery endpoint”.
If you need an access token, you should pass the audience (API identifier) to Auth0 through the OidcClient, as suggested here.

I’m currently working on an article about calling a protected API in a MAUI app, and hopefully it will be published next week. Please, wait until then to have directions on how to obtain an access token and how to call a secure API following best practices :pray:

2 Likes