Add Microsoft Account authentication - stefffdev/NubeSync GitHub Wiki
Add authentication on the server side
- Create your apps in the Azure Active Directory as described here:
https://github.com/Azure-Samples/active-directory-dotnet-native-aspnetcore-v2/tree/master/1.%20Desktop%20app%20calls%20Web%20API - Add the nuget package Microsoft.Identity.Web to your server project:
<PackageReference Include="Microsoft.Identity.Web" Version="0.1.4-preview" />
- Insert your client id in the "AzureAd" section in the server appsettings.json file
- Uncomment the // UNCOMMENT THIS IF YOU WANT TO ACTIVATE AUTHENTICATION code in the server project
Add authentication on the client side
Integrate the client auth workflow as described here:
https://geeks.ms/xamarinteam/2019/07/30/use-microsoft-authentication-librarymsal-in-xamarin-forms/