ASP.NET Core middleware that enables an application to support the Microsoft Account authentication workflow. This package was built from the source code at https://github.com/dotnet/dotnet/tree/87bc0b04e21d786669142109a5128c95618b75ed
$ dotnet add package Microsoft.AspNetCore.Authentication.MicrosoftAccountMicrosoft.AspNetCore.Authentication.MicrosoftAccount provides ASP.NET Core middleware that enables applications to support the Microsoft Account authentication workflow.
To use Microsoft.AspNetCore.Authentication.MicrosoftAccount, follow these steps:
dotnet add package Microsoft.AspNetCore.Authentication.MicrosoftAccount
Program.cs:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAuthentication().AddMicrosoftAccount(microsoftOptions =>
{
microsoftOptions.ClientId = builder.Configuration["Authentication:Microsoft:ClientId"];
microsoftOptions.ClientSecret = builder.Configuration["Authentication:Microsoft:ClientSecret"];
});
The main types provided by this package are:
MicrosoftAccountOptions: Represents the options for configuring Microsoft Account authenticationMicrosoftAccountHandler: The authentication handler responsible for processing Microsoft Account authentication requests and generating the appropriate authentication ticketFor additional documentation and examples, refer to the official documentation on Microsoft Account login setup in ASP.NET Core.
Microsoft.AspNetCore.Authentication.MicrosoftAccount is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.