C#, Web

ASP.NET Identity for your custom user and roles models

I’ve been seeing a lot of requests by developers in the past months who seem to be struggling with adding their custom user authentication model into their application; they want to be able to integrate it into the ASP.NET pipeline to play nice with the Authentication middleware (i.e. AuthorizeAttribute). ASP.NET Identity Core has been rewritten to leverage the use of interfaces (abstraction!) so you can easily develop a system that caters to your needs. In this post, I want to show you how to leverage that by using ASP.NET Identity in an ASP.NET Core 2.0 application. Setup The first thing is to add the ASP.NET Identity package to your project. In Visual Studio 2017, you can right click on the Dependencies…

Read more