asp.netsecurityidentityserver4password-hashsitecore9

How to Change AspNet Identity Password Hash to AspNet.Core Identity Password Hash


We are using Identity Server 4 for User Login Authentication and Authorization. We have implemented ASP NET.Core Identity Password Hash in our Login and used ASPNET.Identity Password Hash in our Registration. How can we change the Registration password hash to Login Password Hash.

I have installed the ASPNET core nuget package and used the IPassword Hasher Method. I am not getting to a point how to resolve this.


Solution

  • You cannot simply convert the hash value from one password hasher to another unless they ofcourse use the exact same hashing mechanism (in which case there would be no need for conversion in the first place).

    I have encountered this scenario in few projects where we changed the password hashing mechanism and effectively, we had to send everyone password reset emails. In another project, it was not feasible so basically we forced the user to change their password upon first login (and we used the old hasher to validate their current password) and the new passwords would have been then hashed using the new hasher.