ASP.Net Core Web API JWT Tutorial [Using JWT in ASP.Net Core]

  Рет қаралды 10,187

Coding Droplets

Coding Droplets

Күн бұрын

Пікірлер: 12
@CodingDroplets
@CodingDroplets 5 ай бұрын
🌟 Get Source Code: www.patreon.com/CodingDroplets
@Flash11I19
@Flash11I19 Ай бұрын
Why didn't you create a refresh token?
@CodingDroplets
@CodingDroplets Ай бұрын
Great question! I’ll be covering refresh tokens in an upcoming video soon, so stay tuned. Thanks for watching and for your feedback!
@muhammadasaad1314
@muhammadasaad1314 5 ай бұрын
hey i want to apply authorization in crud operations meaning only admin can add or delete the users or products others cannot . do u have a video on it or please make one i am looking for an easy way to do that
@CodingDroplets
@CodingDroplets 5 ай бұрын
You can easily implement role-based authorization by adding "ClaimTypes.Role" to the claims during user authentication. Then, when assigning the [Authorize] attribute to your CRUD operations, specify the role that is allowed to perform those actions.
@HasnaSiyad-t6z
@HasnaSiyad-t6z 5 ай бұрын
Great video, Thank you so much. I followed everything and jwt authorizing worked well, but unfortunately the token is not getting expired after the desired time. what may be the reason?
@CodingDroplets
@CodingDroplets 5 ай бұрын
Thank you so much for your kind words! I'm really glad the video was helpful for you. The token expiration should work as I demonstrated. But there might be a slight delay of up to 5 minutes because of the default ClockSkew setting. If you'd like to remove that delay, you can set 'ClockSkew = TimeSpan.Zero' in your token validation parameters. This will make sure the token expires exactly when it’s supposed to.
@HasnaSiyad-t6z
@HasnaSiyad-t6z 5 ай бұрын
@@CodingDroplets ya its worked, Thank you🙂
@OrakzaiSays
@OrakzaiSays 4 ай бұрын
Technically the code is in wrong places. Like the jwt Service should only contain logic specific to JWT token generation, hashing, verification. LoginService or UserService should handle saving and checking user in EF
@CodingDroplets
@CodingDroplets 4 ай бұрын
Thanks for your feedback! As you mentioned, JWT service should indeed focus solely on token generation and validation. Since the video is primarily focused on JWT authentication, I didn’t dive deeply into service creation and structuring.
@RudraPratapSinghLearning
@RudraPratapSinghLearning 2 ай бұрын
@CodingDroplets
@CodingDroplets 2 ай бұрын
Thank You! ♥
DotNet Core Channels with .Net Core Background Service Example
6:31
Coding Droplets
Рет қаралды 2 М.
Secure Your .NET API in 15 Minutes: JWT Authentication Tutorial
15:05
Milan Jovanović
Рет қаралды 30 М.
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
Session Vs JWT: The Differences You May Not Know!
7:00
ByteByteGo
Рет қаралды 324 М.
Implementing JWT Authentication in ASP.NET Core
23:51
Nick Chapsas
Рет қаралды 49 М.
ASP.NET Core Crash Course - C# App in One Hour
1:00:44
freeCodeCamp.org
Рет қаралды 1,6 МЛН