1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-20 11:04:31 -05:00

Fix 2fa dictionary on identity response (#863)

This commit is contained in:
Kyle Spearrin 2020-08-13 16:04:50 -04:00 committed by GitHub
parent 783b4804ec
commit 4d8090d75e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,7 +158,7 @@ namespace Bit.Core.IdentityServer
protected async Task BuildTwoFactorResultAsync(User user, Organization organization, T context)
{
var providerKeys = new List<byte>();
var providers = new Dictionary<byte, Dictionary<string, object>>();
var providers = new Dictionary<string, Dictionary<string, object>>();
var enabledProviders = new List<KeyValuePair<TwoFactorProviderType, TwoFactorProvider>>();
if (organization?.GetTwoFactorProviders() != null)
@ -188,7 +188,7 @@ namespace Bit.Core.IdentityServer
{
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,