1
0
mirror of https://github.com/bitwarden/server synced 2026-01-07 02:53:38 +00:00

Revert TwoFactorProviders to be saved with numerical value (#1828)

* Add enum key resolver

* Change tests to reflect changes
This commit is contained in:
Justin Baur
2022-02-02 14:21:11 -05:00
committed by GitHub
parent 8ce4d56a91
commit 9e074bca49
3 changed files with 26 additions and 6 deletions

View File

@@ -133,7 +133,7 @@ namespace Bit.Core.Entities
public void SetTwoFactorProviders(Dictionary<TwoFactorProviderType, TwoFactorProvider> providers)
{
// When replacing with system.text remember to remove the extra serialization in WebAuthnTokenProvider.
TwoFactorProviders = JsonHelpers.LegacySerialize(providers);
TwoFactorProviders = JsonHelpers.LegacySerialize(providers, JsonHelpers.LegacyEnumKeyResolver);
_twoFactorProviders = providers;
}