mirror of
https://github.com/bitwarden/server
synced 2025-12-23 19:53:40 +00:00
refactorings around two-factor controller
This commit is contained in:
@@ -14,8 +14,6 @@ namespace Bit.Core.Identity
|
||||
var provider = user.GetTwoFactorProvider(TwoFactorProviderType.Authenticator);
|
||||
|
||||
var canGenerate = user.TwoFactorProviderIsEnabled(TwoFactorProviderType.Authenticator)
|
||||
&& user.TwoFactorProvider.HasValue
|
||||
&& user.TwoFactorProvider.Value == TwoFactorProviderType.Authenticator
|
||||
&& !string.IsNullOrWhiteSpace(provider.MetaData["Key"]);
|
||||
|
||||
return Task.FromResult(canGenerate);
|
||||
|
||||
Reference in New Issue
Block a user