ASP.NET Identity Provider SignInManager Keeps Returning Failure

Jacques Bronkhorst picture Jacques Bronkhorst · Oct 17, 2014 · Viewed 27.7k times · Source

I have an issue with the standard ASP Identity provider for MVC5. As soon as I log in the method:

await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);

keeps returning Failure. So I started debugging, By using:

UserManager.FindByEmail(model.Email);

This returns a valid UserID for my user trying to log in. Then I used:

SignInManager.UserManager.CheckPassword(UserIDObtainedFromFind, model.Password);

And this returns true, which means that the password I provide is valid....

Sign In failure

Any ideas on how I can trace, of debug the SignInManager.PasswordSignInAsync method to see where it fails?

Answer

Hao Kung picture Hao Kung · Oct 17, 2014

SignInManager.PasswordSignIn works off of user name, you should double check that the user name is the same as the email you are passing in.