I'm setting up a social sign-in provider authentication without ASP.NET Core Identity with a Microsoft authentication. The linked tutorial uses Google as an example and provides the code to get its authentication scheme for the DefaultChallengeScheme.
What is the authentication scheme for Microsoft? I've been unable to find it.
My Startup.cs > ConfigureServices method:
public void ConfigureServices(IServiceCollection services)
{
//set up using this tutorial https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/social-without-identity?view=aspnetcore-2.2
services
.AddAuthentication(authenticationOptions =>
{
authenticationOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
authenticationOptions.DefaultChallengeScheme = //??? what goes here
})
.AddCookie()
.AddMicrosoftAccount(microsoftOptions =>
{
microsoftOptions.ClientId = Configuration["Authentication:Microsoft:ClientId"];
microsoftOptions.ClientSecret = Configuration["Authentication:Microsoft:ClientSecret"];
});
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
}
authenticationOptions.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;See learn.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/…