✅ .NET Identity can't require 2FA
on registration i set up 2fa and require it to log in:
however when i go to login:
the initial sign in fails (as expected) and
result.RequiresTwoFactor
is false.
what am i doing wrong?3 Replies
ok, this gets even stranger. i checked if 2FA was enabled rigth before sign in and it is enabled.
do i jus tnot understand how signInManager.PasswordSignInAsync works?
found the docs for the signinresult: https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.signinresult?view=aspnetcore-8.0
SignInResult Class (Microsoft.AspNetCore.Identity)
Represents the result of a sign-in operation.
seems to imply that it works lik i think it does
i wish PasswordSignInAsync mentioned wether this flag means that the sign in was sucessful.
ok. tested replaceing the value with true
looks like theres a problem with my ability to sign in period.