I have an application running on asp.net with Identity for user management.
Now I am in production of another application having technologies asp.net core and Angular 7.
I have tried using same DB for both application for login but it didn't worked since Identity on .net and .net core have different Hashing algorithms.
can I use my .net app verification same for .net core and angular 7 app by just giving any Button link from the first application?
When I proceed like above i found some problems listing below:-
How can i proceed with this scenario?
Any help will be appreciated.
Since ASP.NET Core Identity uses a more secure hashing mechanism for the passwords, by default you cannot use an older ASP.NET Identity to access the same database since it doesn’t understand the new mechanism. What works out of the box however is to use ASP.NET Core Identity with old hashes since the hash is actually versioned to allow easy migration from an older database.
If you want ASP.NET Core Identity and ASP.NET Identity to co-exist using the same database, you will have to use the older hashing algorithm since that is the only one ASP.NET Identity supports. Luckily, you can configure ASP.NET Core Identity to only use that algorithm itself.
The configuration is explained in the documentation and looks like this:
services.Configure<PasswordHasherOptions>(option =>
{
option.CompatibilityMode = PasswordHasherCompatibilityMode.IdentityV2;
});
This will effectively downgrade ASP.NET Core Identity to use the older algorithm, allowing full compatibility with ASP.NET Identity.