Skip to content
0:00 / 0:00

#asp.netcoreidentity#authentication#dotnet

Authentication made easy with ASP.NET Core Identity in .NET 8

Milan Jovanović

169K subscribers • 11 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Milan Jovanović, Microsoft MVP
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

172K views2 years ago2 recommendations

Web developmentSecurityHTTP, REST and GraphQLWeb and application securityC# and .NET

Milan Jovanović demonstrates how to implement cookie and token authentication in ASP.NET Core using Identity and EF Core.

Get the source code for this video for FREE → the-dotnet-weekly.ck.page/aspnetcore-identity ☄️ Master the Modular Monolith Architecture: bit.ly/3SXlzSt 📌 Accelerate your Clean Architecture skills: bit.ly/3PupkOJ 🚀 Support me on Patreon to access the source code: patreon.com/milanjovanovic ASP.NET Core Identity is the simplest approach to implementing authentication in .NET. With a few simple configuration steps, you can have cookie and token authentication up and running in minutes. Identity can also integrate with EF Core, allowing you to customize the database. In this video, I'll show you how to get started with ASP.NET Core Identity. We'll also explore the brand-new Identity endpoints. Master Claims Transformation for Flexible ASP.NET Core Authorization milanjovanovic.tech/blog/master-claims-transformation-for-fl… Join my weekly .NET newsletter: milanjovanovic.tech Read my Blog here: milanjovanovic.tech/blog Subscribe for more: youtube.com/@MilanJovanovicTech Chapters Configuring Authorization and Authentication Adding ASP.NET Core Identity Customizing the IdentityDbContext Testing the .NET 8 Identity endpoints Implementing token authentication Adding Authentication to endpoints

Why it's here

2 people recommend this

What people say. Recommended as a straightforward tutorial for setting up authentication and scaffolding Identity endpoints in ASP.NET Core.

u/ggmaniackin r/dotnet • Recommends

On “How to implement authentication in ASP.NET?”

Auth is a first-tier feature of ASP.NET Core (I'm assuming you're doing the modern stuff). The unfortunate thing about it is that it can look very complex and daunting to newbies. There is a lot written about it on the internet. Just be careful to look at something reasonably recent. Microsoft's official documentation is more.. well, documentation. There are entire courses written about it that teach you properly. Here - no affiliation, no recommendation, are some videos that popped up for me. [video [video Good stuff in article form is harder to come by nowadays unfortunately. Microsoft learn is okay, but imo a bit dense, in both ways of meaning.

u/JonahL98in r/dotnet • Recommends

On “Best way to handle Authentication/Authorization”

If you want things to be absolutely as simple as humanly possible, you can scaffold both the Identity Db Context and the Identity Endpoints. See this link to this videofor a tutorial. The only thing you would need to manage is how the roles get assigned. Since you scaffolded identity you can use UserManager to do this.

u/JonahL98in r/dotnet • Recommends

On “Authentication and Authorization Further Confusion”

You are welcome and don't feel bad Microsoft's Identity documentation is very scattered. This link to this video explains how to scaffold the db context and apis. Again you might have to make modifications to registration. I've never tried but you could maybe block the register api with middleware or something, or take the source code and modify to your needs. Just build your identity user class and scaffold away. Again you will write your own internal management app that uses the user manager, role manager, etc. Then just use normal \Authorize\ attribute on your APIs and you are golden. You could easily extend Microsoft's apis to add an internalregister and manageroles that just wraps these classe…