21 references to GetTwoFactorEnabledAsync
Identity.ExternalClaims (2)
Pages\Account\Manage\Disable2fa.cshtml.cs (1)
37
if (!await _userManager.
GetTwoFactorEnabledAsync
(user))
Pages\Account\Manage\TwoFactorAuthentication.cshtml.cs (1)
48
Is2faEnabled = await _userManager.
GetTwoFactorEnabledAsync
(user);
IdentitySample.Mvc (1)
Controllers\ManageController.cs (1)
55
TwoFactor = await _userManager.
GetTwoFactorEnabledAsync
(user),
Microsoft.AspNetCore.Identity (2)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
329
IsTwoFactorEnabled = await userManager.
GetTwoFactorEnabledAsync
(user),
SignInManager.cs (1)
807
await UserManager.
GetTwoFactorEnabledAsync
(user) &&
Microsoft.AspNetCore.Identity.Specification.Tests (1)
UserManagerSpecificationTests.cs (1)
1675
Assert.True(await manager.
GetTwoFactorEnabledAsync
(user));
Microsoft.AspNetCore.Identity.Test (7)
SignInManagerTest.cs (5)
208
manager.Setup(m => m.
GetTwoFactorEnabledAsync
(user)).ReturnsAsync(true).Verifiable();
277
manager.Setup(m => m.
GetTwoFactorEnabledAsync
(user)).ReturnsAsync(true).Verifiable();
315
manager.Setup(m => m.
GetTwoFactorEnabledAsync
(user)).ReturnsAsync(true).Verifiable();
484
manager.Setup(m => m.
GetTwoFactorEnabledAsync
(user)).ReturnsAsync(userTwoFactorEnabled).Verifiable();
779
manager.Setup(m => m.
GetTwoFactorEnabledAsync
(user)).ReturnsAsync(true).Verifiable();
UserManagerTest.cs (2)
906
await Assert.ThrowsAsync<NotSupportedException>(async () => await manager.
GetTwoFactorEnabledAsync
(null));
1117
async () => await manager.
GetTwoFactorEnabledAsync
(null));
Microsoft.AspNetCore.Identity.UI (8)
Areas\Identity\Pages\V4\Account\Manage\Disable2fa.cshtml.cs (1)
58
if (!await _userManager.
GetTwoFactorEnabledAsync
(user))
Areas\Identity\Pages\V4\Account\Manage\GenerateRecoveryCodes.cshtml.cs (2)
66
var isTwoFactorEnabled = await _userManager.
GetTwoFactorEnabledAsync
(user);
83
var isTwoFactorEnabled = await _userManager.
GetTwoFactorEnabledAsync
(user);
Areas\Identity\Pages\V4\Account\Manage\TwoFactorAuthentication.cshtml.cs (1)
85
Is2faEnabled = await _userManager.
GetTwoFactorEnabledAsync
(user);
Areas\Identity\Pages\V5\Account\Manage\Disable2fa.cshtml.cs (1)
58
if (!await _userManager.
GetTwoFactorEnabledAsync
(user))
Areas\Identity\Pages\V5\Account\Manage\GenerateRecoveryCodes.cshtml.cs (2)
66
var isTwoFactorEnabled = await _userManager.
GetTwoFactorEnabledAsync
(user);
83
var isTwoFactorEnabled = await _userManager.
GetTwoFactorEnabledAsync
(user);
Areas\Identity\Pages\V5\Account\Manage\TwoFactorAuthentication.cshtml.cs (1)
85
Is2faEnabled = await _userManager.
GetTwoFactorEnabledAsync
(user);