I'm using identity server in order to have a dynamic identity provider so i add .AddIdentityProviderStore() this line in order to reach my goal but with this line in login page i get all the identity providers registred in the database but when i try to connect with one of theme i get this error :
No authentication handler is registered for the scheme 'google'. The registered schemes are: Identity.Application, Identity.External, Identity.TwoFactorRememberMe, Identity.TwoFactorUserId, idsrv, idsrv.external. Did you forget to call AddAuthentication().AddSomeAuthHandler?
builder.Services.AddIdentityServer(options => {
options.ServerSideSessions.UserDisplayNameClaimType = "name";
options.KeyManagement.SigningAlgorithms = new[]
{
// RS256 for older clients (with additional X.509 wrapping)
new SigningAlgorithmOptions(SecurityAlgorithms.RsaSha256) { UseX509Certificate = true },
// PS256
new SigningAlgorithmOptions(SecurityAlgorithms.RsaSsaPssSha256),
// ES256
new SigningAlgorithmOptions(SecurityAlgorithms.EcdsaSha256)
};
})
.AddIdentityProviderStore<IIdentityProviderStore>()
.AddServerSideSessions()
.AddAspNetIdentity<UserIdentity>()
.AddConfigurationStore(options =>
{
options.ConfigureDbContext = b =>
b.UseSqlServer(defaultConnString, opt => opt.MigrationsAssembly(assembly));
})
.AddOperationalStore(options =>
{
options.ConfigureDbContext = b => b.UseSqlServer(defaultConnString, opt => opt.MigrationsAssembly(assembly));
});