JWT Authentication in .NET 9: Roles & Refresh Tokens

Learn JWT auth in .NET 9 with roles, refresh tokens, and full source code. Holiday sale ends today! πŸŽ„

JWT Authentication in .NET 9: Roles & Refresh Tokens
Patrick God
134.8K views β€’ Jan 8, 2025
JWT Authentication in .NET 9: Roles & Refresh Tokens

About this video

πŸŽ„ Holiday Sale at the .NET Web Academy ends today: https://dnwa.net/4fR26wb
---
πŸ“‘ Get the complete Source Code here: https://dnwa.net/3Pnqo6a

00:00 - Introduction
02:24 - Creating the User Entity
05:23 - Adding a Data Transfer Object (DTO)
06:37 - Building the Authentication Controller
08:59 - Implementing Password Hashing
12:50 - Introducing Scalar for API Testing
15:30 - Implementing the Login Endpoint
19:52 - Generating JWT Tokens
31:13 - Adding Entity Framework Core and Database Context
36:22 - Adding Code-First Migrations
38:25 - Refactoring with a Service Layer
47:40 - Securing Endpoints with [Authorize]
54:00 - Adding Roles to the User Model
59:00 - Implementing to Refresh Tokens
1:10:30 - Creating the Refresh Token Endpoint

Video Information

Views

134.8K

Likes

3.9K

Duration

01:13:38

Published

Jan 8, 2025

User Reviews

4.7
(26)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.