4

I have a ASP.NET Core web application, having builtin authentication.

How can I authenticate Xamarin native mobile app with web app and use web services?

Is there any Xamarin library for authenticating Microsoft Identity Server?

I found an article describing creating web service backend in ASP.NET core, but it omitted authentication (why?) :

https://learn.microsoft.com/en-us/aspnet/core/mobile/native-mobile-backend

2 Answers 2

3

In the article they use Web API template, problem is that ASP.NET Core does support personal authentication from a box (at least for right now)

Take a look at this project OpenIddict. It's really easy to use and thay have a lot of examples how to build your own authentication service based on ASP.NET Core Web API. There is only one drawback of this project (by my opinion) - from the box OpenIddict supports only EF Core as data access library, but you can implement your own provider.

Sign up to request clarification or add additional context in comments.

2 Comments

remark that EF is an object-relational mapper, not database provider. And you may simply configure it to use another DB, like PostgreSQL, instead if SQL.
May be it was not clear but by provider I mean not EF, I mean OpenIddict data provider, If you want work with OpenIddict and EF 6.x as example than you have to implement your own data provider for OpenIddict.
3

There´s no Xamarin client for Microsoft Identity Server per se, but you can use oAuth2. It´s pretty standard.

Implementing an oAuth2 server like OpenIddict, IdentityServer or AspNet.Security.OpenIdConnect.Server you can use any oAuth2 client to authenticate, either way from a javascript application or Xamarin.

For Xamarin/.NET clients, there is an awesome client (PCL) called IdentityModel.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.