Authenticate a user from a MAUI app against the local Microsoft Identity in the ASP.NET website

123 Views Asked by At

I have created a website with ASP.NET 8.0 Core. In this web application, I added Microsoft Identity and I added Microsoft and Google as external providers. So, a user can register or login with the local credentials or one of the external providers.

On the website, the authentication is working. Now, I want to extend the registration and the login from the MAUI application.

My idea is to create a few APIs for the authentication and in particular:

  • a login endpoint that receives username and password
  • a registration endpoint with all the basic details of the user (name, surname, email and password)

Is this a correct approach or best practice?

The other issue I'm thinking about is the authentication with the external providers. How can I manage the authentication from the app for Microsoft and Google and verify that the user exists in the web application?

0

There are 0 best solutions below