14 Authentication: adding users to your application with Identity
This chapter covers
- How authentication works in web apps in ASP.NET Core
- Creating a project using the ASP.NET Core Identity system
- Adding user functionality to an existing web app
- Customizing the default ASP.NET Core Identity UI
One of the selling points of a web framework like ASP.NET Core is the ability to provide a dynamic app, customized to individual users. Many apps have the concept of an “account” with the service, which you can “sign in” to and get a different experience.
Depending on the service, an account gives you varying things: on some apps you may have to sign in to get access to additional features, on others you might see suggested articles. On an e-commerce app, you’d be able to make and view your past orders, on Stack Overflow you can post questions and answers, whereas on a news site you might get a customized experience based on previous articles you’ve viewed.
When you think about adding users to your application, you typically have two aspects to consider:
- Authentication—The process of creating users and letting them log in to your app
- Authorization—Customizing the experience and controlling what users can do, based on the current logged-in user