Add Microsoft Account authentication - stefffdev/NubeSync GitHub Wiki

Add authentication on the server side

  1. 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
  2. Add the nuget package Microsoft.Identity.Web to your server project:
<PackageReference Include="Microsoft.Identity.Web" Version="0.1.4-preview" />
  1. Insert your client id in the "AzureAd" section in the server appsettings.json file
  2. 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/