1
0
mirror of https://github.com/bitwarden/server synced 2025-12-26 05:03:18 +00:00

refactor code to with user TwoFactorProviders

This commit is contained in:
Kyle Spearrin
2017-06-07 14:14:34 -04:00
parent d8c0994ed3
commit ecc2468409
10 changed files with 166 additions and 53 deletions

View File

@@ -168,7 +168,7 @@ namespace Bit.Core.Identity
public Task<bool> GetTwoFactorEnabledAsync(User user, CancellationToken cancellationToken)
{
return Task.FromResult(user.TwoFactorEnabled && user.TwoFactorProvider.HasValue);
return Task.FromResult(user.TwoFactorIsEnabled());
}
public Task SetSecurityStampAsync(User user, string stamp, CancellationToken cancellationToken)