damienbod / AspNetCoreHybridFlowWithApi

Different ASP.NET Core applications using OpenID Connect Hybrid flow Code Flow, Code Flow with PKCE, JWT APIs, MFA examples
https://damienbod.com/2018/02/02/securing-an-asp-net-core-mvc-application-which-uses-a-secure-api/
MIT License
356 stars 70 forks source link

UserManager.VerifyTwoFactorTokenAsync always return fasle #45

Closed TariqHajeer closed 1 year ago

TariqHajeer commented 1 year ago

I've run the IdentityStandaloneMfa project and tried mfa with google and Microsoft authenticator, but this function VerifyTwoFactorTokenAsync always returns false also i tried to set EmailConfirmed to true and did not work

TariqHajeer commented 1 year ago

TOTP client and server time skew

TOTP (Time-based One-Time Password) authentication depends on both the server and authenticator device having an accurate time. Tokens only last for 30 seconds. If TOTP 2FA logins are failing, check that the server time is accurate, and preferably synchronized to an accurate NTP service.

use: sync with an internet time server: time.nist.gov dont use: time.windows.com

this link help me