1
0
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:
Kyle Spearrin
2017-06-20 10:08:59 -04:00
parent 475160cfe1
commit 612697e815
8 changed files with 79 additions and 159 deletions

View File

@@ -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);