1
0
mirror of https://github.com/bitwarden/server synced 2026-01-04 01:23:25 +00:00

reference OrganizationMembership instead

This commit is contained in:
Kyle Spearrin
2018-08-31 17:05:27 -04:00
parent b2d63b2383
commit 2562d5a40d
8 changed files with 54 additions and 61 deletions

View File

@@ -21,7 +21,7 @@ namespace Bit.Core.Identity
public async Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<User> manager, User user)
{
var provider = user.GetTwoFactorProvider(TwoFactorProviderType.Authenticator);
if(string.IsNullOrWhiteSpace((string)provider.MetaData["Key"]))
if(string.IsNullOrWhiteSpace((string)provider?.MetaData["Key"]))
{
return false;
}