I have a confused about three packages in asp.net core identity. I don't know what's the difference between each other. And also which of those should we use?
I found this link in GitHub, but I didn't get it.
Difference between Microsoft.Extensions.Identity.Stores and Microsoft.AspNetCore.Identity
ASP.NET Core Identity: Is an API that supports user interface (UI) login functionality. Manages users, passwords, profile data, roles, claims, tokens, email confirmation, and more.
ASP.NET Core Identity is a membership system that enables you to add login functionality to your application, allowing visitors to create an account and login with a user name and password from Facebook, Google or other external login providers.
ASP.NET Identity is a new system of user authentication and authorization, that continues the evolution of ASP.NET membership system, and is used in the Visual Studio 2013 project templates for ASP.NET MVC, Web Forms, Web API and SPA. You can read more on ASP.NET Identity in Microsoft documentation.
This assembly contains the entity definition of the entire asp.net core Identity framework, roughly including IdentityUser
,IdentityRole
,IdentityUserRole
, IdentityUserClaim
, IdentityRoleClaim
, IdentityUserLogin
.It can also be understood as a database table.
This assembly is mainly used to perform basic CRUD to the above entities, including user management (UserManager
) and role management (RoleManager
), and some configurations that can be performed, such as user name restrictions, password verification, and so on. Specific storage implementations need to download other packages, such as Microsoft.AspNetCore.Identity.EntityFrameworkCore
which is the implementation of data storage using EF Core.
This assembly is used to manage authentication and authorization in the AspNetCore project, and also includes the basic configuration in the AspNetCore project. For example, to use the Identity framework, you need to execute services.AddIdentity <TUser> ()
in the ConfigureServices
method.
Basic secondary development is based on the above core packages. If you want asp.net core Identity to support other ORM frameworks, such as Dapper, then you can use Microsoft.Extensions.Identity.Stores
for secondary development. Or if some business
logic does not meet your special needs, and it is also developed using this package.
If you want to extend the field, you need the Microsoft.Extensions.Identity.Core
package, and inherit the relevant classes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With