Christopher Schwarz Christopher Schwarz - 4 months ago 68
ASP.NET (C#) Question

Migrate password hash from ASP.NET Identity 2.0 to 3.0

Currently, I have password hashes generated using ASP.NET Identity 2.0.

Is it possible to verify these passwords using new ASP.NET Identity 3.0?

Answer

Try to set PasswordHasherCompatibilityMode to V2(below code was not tested) :

    public void ConfigureServices(IServiceCollection services)
    {
        services.Configure<PasswordHasherOptions>(options => options.CompatibilityMode = PasswordHasherCompatibilityMode.IdentityV2);
    }

also see How to set PasswordHasherCompatibilityMode.IdentityV3 in ASP.NET 5 Identity?