
Angular & ASP.NET Core Web API Authentication | Authorization -A Step by Step Guide - Part 1
š Dive into the world of cutting-edge development with our latest tutorial series, "Angular & ASP.NET Core Web API Authentication | Authorization -A Step by Step Guide - Part 1"! šš» š In this episode, we embark on a journey to implement robust user authentication in a modern web application. Learn how to leverage the power of .NET 8 WebAPI to create a secure backend and Angular 17 for a dynamic front-end. The focus will be on role-based authentication, ensuring that users have the right permissions for their actions. Watch Part 2: https://youtu.be/U0w2vWlmrh4 Other Tutorials You may like : https://youtu.be/WxkI70w-bwY https://youtu.be/QC-XXwsDguw #angular17 #dotnet8 #jwt #webapi ========GITHUB REPOSITORY ======= https://t.ly/1FKLM Outline: 0:00 Environment setup for .net 8 and angular 19 3:30 Create .net web api for backend 6:40 Create user model 7:20 Create data for accessing data from database 8:09 Add SqliteDb In Programs 8:51 Define JWT Settings in AppSettings.json file 10:14 Add Identity With IdentityRole in Programs 10:48 Lets Add JWT Bearer Authentication 12:45 Get JWT Setting From AppSetting.Json File 14:09 Additional Property In Swaggern Add OpenAPI 18:00 Create Initial Migrations 19:48 Create Account Controller 23:50 Implement Register Endpoint 24:41 Create RegisterDto Dto Class 29:30 Create AuthResponse Dto Class 33:45 Implement Login Endpoint 34:35 Create LoginDto Class 37:40 Cerate Private GenerateToken method 43:58 Try Login Endpoint in Swagger 44:48 Implement GetUserDetail Endpoint f or getting Detail of Current Login User 50:00 Implement GetAllUser Methods 52:01 Create RoleController 53:32 Implement CreateRole Endpoint 57:20 Implement GetRoles Endpoint 1:00:00 Implement Delete Role 1:02:50 Authorize Endpoints using Authorize Attribute 1:04:10 Add Role Base Access 1:07:38 Implement Assign Role Endpoint