This is a third part of the series of articles about some not-so-well-known features and tricks in ASP.NET Identity. Here are you can find the [first]({{ 'ancid05' | internal_path }}) and the [second]({{ 'ancid02' | internal_path }}) parts.
Problem
This task usually appears when you need to transfer your old MVC web application to ASP.NET Core. If you use MVC version 3 or 4 and your application provides a user authentication service, then most likely this part is done with the old ASP.NET Membership library.
So, imagine you have a bunch of users, each of them has some password and the hash of that password stored in some database. Now you need to transfer all your current users to the new system built with ASP.NET Core. Of course, it's not a big problem to transfer their names, addresses, and other information. The problem is in those password hashes. ASP.NET Core Identity uses another hashing algorithm so all current users will not be able to access the system with their old passwords - the hashes will not match.