I\'m trying to add facebook login to my .NET Core 2.1 site
I\'m following this , guide and more specific, this (for facebook login)
After have adding the lines
For me (ASP.NET Core v2), I had:
services.AddIdentity()
.AddEntityFrameworkStores()
.AddUserStore()
.AddRoleStore()
.AddRoleManager()
.AddDefaultTokenProviders();
in Startup.cs. And when I scaffolded Identity, it added IdentityHostingStartup.cs, and I had copy/pasted another similar but default block in based on some email sending code:
builder.ConfigureServices((context, services) =>
{
services.AddDefaultIdentity(config =>
{
config.SignIn.RequireConfirmedEmail = false;//TODO:
})
.AddEntityFrameworkStores();
});
So I moved ALL Identity config into IdentityHostingStartup.cs (ie only 1 configure!!!) it worked as expected...