Skip to content
0:00 / 0:00

#asp.netcore#authentication#authorization

ASP.NET Core 5.0 - Authentication/Authorization - .Net Engineering Forum 2021-01-26

Tony “mobiletonster” Spencer

3.5K subscribers • 1 video on Hallway

YouTube
  • Recommended by 3 people: 3 in engineering communities.
  • Presented by Tony Spencer
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Beginner. No background in the topic needed.

136K views5 years ago3 recommendations

Web developmentSecurityHTTP, REST and GraphQLWeb and application security

Tony Spencer breaks down authentication and authorization in ASP.NET Core with step-by-step cookie authentication setup.

PART 1: Authentication and Authorization is one of the hardest topics to understand. In this video, we try to break it down into simple pieces with straightforward sample code in C#. Tony Spencer presents a primer on Authentication/Authorization in ASP.NET Core 5.0 (valid for 3.1 and 6.0 full API/MVC). Authentication in ASP.NET Core 5.0 series: mobiletonster.com/area/code - website with companion articles & code PART 1 - (this video) - youtu.be/BWa7Mu-oMHk PART 2 - (Challenge Scheme) - youtu.be/K0Z7GTOvbMo PART 3 - (IDaaS & Multiple Providers) - youtu.be/Cej_u3fb9rI PART 3a - (Connect SQLite DB) - youtu.be/z-Hll4Xddjs Chapters Intro Overview Identity example clip Authorization example clip Creating sample app in Visual Studio 2019 Adding the secured route The forgetful doorman Connecting cookie authentication handler to services in Startup.cs Building the login page Redirecting user back to original url after login Calling SignInAsync() method Handling incorrect username/password Hooking up logout Adding a claim (user’s name) to the list of claims Exploring signin events in cookie authentication Using roles for authorization Creating custom “access denied” page Adding custom role claim to user Final thoughts Intro includes music: Spend My Time With You (Electro Swing Remix) - 11 Acorn Lane 11acornlane.com youtube.com/watch?v=zPMNu8pX2zw Sweet - I.Y.F.F.E. & Auratic & Au5 Other music: Mosswood - Steve Adams (YouTube Music Library)

Why it's here

3 people recommend this

What people say. Highly recommended for developers struggling to understand the complex .NET Identity and authentication system.

u/woo545in r/dotnet • Recommends

On “Does anyone else feel as lost as I do in the .NET Identity documentation?”

Ha!! We've been banging our heads on the wall for like 3 months! We've asked Microsoft, we've asked our partners and they couldn't provide us the help we needed (trying to use both Teams token and redirect auth in the same project. It's been an absolute pain in the butt. So many terms, so difficult to understand how things connect together (MS-600 was a little helpful) We did find this series of videos extremely useful: [video We only went through the first 3. With this, our solution ended up very small.

u/CubedEchoin r/dotnet • Recommends

Cookie Authentication in .NET 5 w/out Microsoft's built in Identity

u/mobiletonster1in r/dotnet • Recommends

On “Certification Recommendation for .net security Apps (Identity, Auth, OID)”

For Authentication, start here: link to this video This is part 1 of a 3 part series that will help you understand what is going on.

u/CubedEchoin r/dotnet • Recommends

On “Trouble setting up authentication for a dotnet web application web api project.”

I found that this tutorial helps a lot. [ASP.NET Core 5.0 - Authentication/Authorization - .Net Engineering Forum 2021-01-26 - YouTube]

u/mobiletonster1in r/dotnet • Mentions

On “Is IdentityServer the "go-to" or is there an alternative?”

Auth is hard. So hard, that I put together a video series on YouTube that you should really invest some time into watching to understand the issues and pitfalls. PART 1 - Authentication & Authorization in ASPNET CORE 5 PART 1 Video: [video PART 2 - Authentication - The Challenge in ASPNET CORE 5 PART 2 Video: [video PART 2a (supplement) - Adding SQLite DB using EF Core Code First in ASPNET CORE 5 PART 2a (supplement) Video: [video PART 3 - Authentication - IDaaS (Okta) and Multiple Challenge Providers PART 3 Video: [video The video does walk through an Okta implementation in Part 3. Although this was recorded for .Net core 5, it still applies to .net 6, especially if you s…

u/mobiletonster1in r/dotnet • Mentions

On “Service or library to manage authentication, permissions and roles”

Auth is a difficult thing to get right. I put together a 3 part series on Authentication/Authorization in asp.net core and it is a pretty good starting point to help you understand how it works under the covers: PART 1 - Authentication & Authorization in ASPNET CORE 5+ PART 1 Video: [video PART 2 - Authentication - The Challenge in ASPNET CORE 5+ PART 2 Video: [video PART 2a (supplement) - Adding SQLite DB using EF Core Code First in ASPNET CORE 5+ PART 2a (supplement) Video: [video PART 3 - Authentication - IDaaS (Okta) and Multiple Challenge Providers PART 3 Video: [video

u/comp_freakin r/dotnet • Mentions

On “Web Api Authentication best practice?”

Here is MS guide line example - https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/1-WebApp-OIDC My current and last workplace has implemented custom solution using Identity Server 4 https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/1-WebApp-OIDC Someone shared this link few weeks back, I haven't got chance to go through it [video

u/woo545in r/dotnet • Mentions

On “Can i get a sample project on Authenticating & Authorization of a Web API?”

Check out the first 3 videos: link to this video

u/woo545in r/dotnet • Mentions

On “Authentication And Authorization”

We used these videos as a reference to help understand how things work