AspNetIdentity icon indicating copy to clipboard operation
AspNetIdentity copied to clipboard

Added support to .NET Standard

Open tomasherceg opened this issue 10 months ago • 1 comments

Entity Framework 6.4 is supported with the new .NET, but many developers also use the ASP.NET Identity Entity Framework. Their DbContext inherits from IdentityDbContext, making the migration to the new .NET impossible.

I have ported the Microsoft.AspNet.Identity.Core and Microsoft.AspNet.Identity.EntityFramework to netstandard2.1;net45 - the same targets as EntityFramework package has.

I have also copied the Owin hosting project and added AspNetCore version that tries to replicate its functionality as closely as possible - only removes many helper extension methods that seem to be redundant to the API we have in ASP.NET Core.

I have also gone through all tests and made them working on both versions (except for the tests of IAuthenticationManager API which is not present in the new .NET at all).

I am not sure if this PR can ever get merged as it is an old security-related library which probably has to go through some security review. Also, maybe it is not a good idea to encourage people to potentially use the old version ASP.NET Identity in new projects. However, I found it useful in several modernization projects as it allowed me to keep using EF6 temporarily and not to migrate everything at the same time.

tomasherceg avatar Apr 24 '24 10:04 tomasherceg