diff --git a/src/Core/IdentityServer/BaseRequestValidator.cs b/src/Core/IdentityServer/BaseRequestValidator.cs index 806fd5e5a270..e67993d7cd72 100644 --- a/src/Core/IdentityServer/BaseRequestValidator.cs +++ b/src/Core/IdentityServer/BaseRequestValidator.cs @@ -158,7 +158,7 @@ protected async Task BuildSuccessResultAsync(User user, T context, Device device protected async Task BuildTwoFactorResultAsync(User user, Organization organization, T context) { var providerKeys = new List(); - var providers = new Dictionary>(); + var providers = new Dictionary>(); var enabledProviders = new List>(); if (organization?.GetTwoFactorProviders() != null) @@ -188,7 +188,7 @@ protected async Task BuildTwoFactorResultAsync(User user, Organization organizat { providerKeys.Add((byte)provider.Key); var infoDict = await BuildTwoFactorParams(organization, user, provider.Key, provider.Value); - providers.Add((byte)provider.Key, infoDict); + providers.Add(((byte)provider.Key).ToString(), infoDict); } SetTwoFactorResult(context,