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