Introduction to ASP.NET Core Identity Architecture
It serves as a robust membership system, enhancing ASP.NET Core web UIs with user registration and sign-in functionalities. This framework seamlessly handles both authentication, determining user identity, and authorization, specifying user permissions.
Diverse Authentication Options
In addition to traditional local account creation, Identity supports integration with external sign-in providers like Facebook and Twitter. User sessions are managed via cookie-based authentication, generating a cookie upon sign-in and removing it upon sign-out.
Flexible Data Storage
Membership data is stored using a chosen data store and access technology, with Entity Framework (EF) Core being the default Object-Relational Mapper (O/RM). SQL Server typically serves as the default data store, though other options like SQLite are available. Identity abstracts the complexities of database interaction, enabling compatibility with various database providers and alternative data access technologies such as Dapper.
Identity architecture comprises key layers:
- ASP.NET Core Razor Pages app: Represents the web UI integrated with Identity support.
- Identity Manager layer: Contains classes from the Microsoft.AspNetCore.Identity namespace, including SignInManager
and UserManager . - EF Core Identity Store layer: Incorporates classes from the Microsoft.AspNetCore.Identity.EntityFrameworkCore namespace, such as UserStore
. - Database Provider: Executes SQL commands from the EF Core Provider, ensuring seamless interaction with the chosen database.
Database Schema Maintenance
EF Core simplifies database schema management through migrations, facilitating incremental updates to keep the schema synchronized with the app’s data model. Initial migrations create essential database tables, ensuring alignment between data structures and application logic.
In Conclusion
The article provides insights into the ASP.NET Core Identity architecture, laying the groundwork for implementing default Identity functionalities in subsequent units.
More Articles
Follow me on
C# Publication, LinkedIn, Instagram, Twitter, Dev.to







