Does asp.net identity 2.0 hash passwords differently than 1.0?

吃可爱长大的小学妹 提交于 2019-12-11 18:58:06

问题


I just updated my app from asp.net identity 1.0 to 2.0 to take advantage of the email confirmation, two-factor auth, etc...

However, user's cannot log in now. It seems await UserManager.FindAsync(model.UserName, model.Password); doesn't find existing users who signed up on identity 1.0... but user's who signed up during identity 2.0 work fine.


回答1:


Hashing is exactly the same.
Identity 2.0 UserManager.FindAsync(UserName, Password) can return null for users registered with Identity 1.0. There are some new fields in the AspNetUsers table which are manadatory - NOT NULL.
Most possible reason is the AccessFailedCount field. If it is null, you don't see any exceptions, only null user.



来源:https://stackoverflow.com/questions/24026912/does-asp-net-identity-2-0-hash-passwords-differently-than-1-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!