You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have a question
twofactor authentication is outofbox feature so can we implement the twofactor authentication in the accountconntoller/login(postmethod) like.
when the user is login to the application can we check user is eligible for the RequiresTwoFactor and then implement the customziation for the two factor authentication.
var user = await _signInManager.UserManager.FindByNameAsync(model.Username);
// validate username/password using ASP.NET Identity
var result= await _signInManager.CheckPasswordSignInAsync(user, model.Password, true));
if (user != null && result.Success)
{
//credential based authentication
}
else if (result.RequiresTwoFactor)
{
//can we write our twofactor authentication here.
}
can you please help to correct me if i'm may wrong also.
looking for best solution for twofactor authentication.
The text was updated successfully, but these errors were encountered:
i have a question
twofactor authentication is outofbox feature so can we implement the twofactor authentication in the accountconntoller/login(postmethod) like.
when the user is login to the application can we check user is eligible for the RequiresTwoFactor and then implement the customziation for the two factor authentication.
var user = await _signInManager.UserManager.FindByNameAsync(model.Username);
// validate username/password using ASP.NET Identity
var result= await _signInManager.CheckPasswordSignInAsync(user, model.Password, true));
if (user != null && result.Success)
{
//credential based authentication
}
else if (result.RequiresTwoFactor)
{
//can we write our twofactor authentication here.
}
can you please help to correct me if i'm may wrong also.
looking for best solution for twofactor authentication.
The text was updated successfully, but these errors were encountered: