17 references to VerifyTwoFactorTokenAsync
Identity.ExternalClaims (1)
Pages\Account\Manage\EnableAuthenticator.cshtml.cs (1)
90
var is2faTokenValid = await _userManager.
VerifyTwoFactorTokenAsync
(
Microsoft.AspNetCore.Identity (1)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
284
if (!await userManager.
VerifyTwoFactorTokenAsync
(user, userManager.Options.Tokens.AuthenticatorTokenProvider, tfaRequest.TwoFactorCode))
Microsoft.AspNetCore.Identity.Specification.Tests (5)
UserManagerSpecificationTests.cs (5)
1657
Assert.False(await manager.
VerifyTwoFactorTokenAsync
(user, factorId, token));
1693
() => manager.
VerifyTwoFactorTokenAsync
(user, "bogus", "bogus"));
1854
Assert.False(await manager.
VerifyTwoFactorTokenAsync
(user, factorId, token));
1870
Assert.False(await manager.
VerifyTwoFactorTokenAsync
(user, "Email", token));
1884
Assert.False(await manager.
VerifyTwoFactorTokenAsync
(user, "Phone", "bogus"));
Microsoft.AspNetCore.Identity.Test (8)
SignInManagerTest.cs (7)
362
manager.Setup(m => m.
VerifyTwoFactorTokenAsync
(user, providerName ?? TokenOptions.DefaultAuthenticatorProvider, code)).ReturnsAsync(true).Verifiable();
404
manager.Setup(m => m.
VerifyTwoFactorTokenAsync
(user, providerName ?? TokenOptions.DefaultAuthenticatorProvider, code)).ReturnsAsync(false).Verifiable();
443
manager.Setup(m => m.
VerifyTwoFactorTokenAsync
(user, providerName ?? TokenOptions.DefaultAuthenticatorProvider, code)).ReturnsAsync(false).Verifiable();
667
manager.Setup(m => m.
VerifyTwoFactorTokenAsync
(user, provider, code)).ReturnsAsync(true).Verifiable();
728
manager.Setup(m => m.
VerifyTwoFactorTokenAsync
(user, provider, code)).ReturnsAsync(false).Verifiable();
1193
manager.Setup(m => m.
VerifyTwoFactorTokenAsync
(user, provider, code)).ReturnsAsync(true).Verifiable();
1259
manager.Setup(m => m.
VerifyTwoFactorTokenAsync
(user, provider, code)).ReturnsAsync(false).Verifiable();
UserManagerTest.cs (1)
1123
async () => await manager.
VerifyTwoFactorTokenAsync
(null, null, null));
Microsoft.AspNetCore.Identity.UI (2)
Areas\Identity\Pages\V4\Account\Manage\EnableAuthenticator.cshtml.cs (1)
133
var is2faTokenValid = await _userManager.
VerifyTwoFactorTokenAsync
(
Areas\Identity\Pages\V5\Account\Manage\EnableAuthenticator.cshtml.cs (1)
133
var is2faTokenValid = await _userManager.
VerifyTwoFactorTokenAsync
(