mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 05:00:19 -05:00
[PM-5566] Remove U2F keys from TwoFactorProviders (#3645)
* Remove U2F keys from TwoFactorProviders * Remove U2f from Premium check.
This commit is contained in:
parent
974d23efdd
commit
ef359c3cf1
@ -56,7 +56,6 @@ public class TwoFactorProvider
|
||||
{
|
||||
case TwoFactorProviderType.Duo:
|
||||
case TwoFactorProviderType.YubiKey:
|
||||
case TwoFactorProviderType.U2f: // Keep to ensure old U2f keys are considered premium
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -137,6 +137,13 @@ public class User : ITableObject<Guid>, ISubscriber, IStorable, IStorableSubscri
|
||||
TwoFactorProviders);
|
||||
}
|
||||
|
||||
// U2F is no longer supported, and all users keys should have been migrated to WebAuthn.
|
||||
// To prevent issues with accounts being prompted for unsupported U2F we remove them
|
||||
if (_twoFactorProviders.ContainsKey(TwoFactorProviderType.U2f))
|
||||
{
|
||||
_twoFactorProviders.Remove(TwoFactorProviderType.U2f);
|
||||
}
|
||||
|
||||
return _twoFactorProviders;
|
||||
}
|
||||
catch (JsonException)
|
||||
|
Loading…
x
Reference in New Issue
Block a user