Комментарии •

  • @hello-matthew
    @hello-matthew 2 года назад +19

    Thank you - this was perfect! I liked the fast pace and length of the tutorial. Your tutorial is uncluttered, clear, and to the point. Keep making more!

  • @programmingcake8910
    @programmingcake8910 2 года назад +2

    This is the best tutorial on JWT Authentication and Authorization I've ever seen so far, Thank you so much for your efforts.

  • @monaziralam1862
    @monaziralam1862 4 месяца назад +1

    Clear, crisp and quality teaching by saving the time too, great man!

  • @justraccoon3047
    @justraccoon3047 2 года назад +5

    Omg Bro, you're incredible. I tried to add this functionality for a very long time and nothing ended with success. But your video solved my problem just in 30 minutes. And one more thing, your English is very understandable for non-native speakers. Thank you a lot!

    • @CodeWithJulian
      @CodeWithJulian 2 года назад +1

      Thanks, really appreciate your feedback, happy it's been useful!

  • @bloggrammer
    @bloggrammer 2 года назад +3

    Great video, @Code with Julian. Well done.
    In the Authenticate method in the LoginController class, there's no need to check for null. The Linq FirstOrDefault(...) will return null if the user with the conditions is not found, otherwise, it will return a user model.
    Thank you for the video.

  • @okeluelazarus7062
    @okeluelazarus7062 5 месяцев назад +2

    Bro this tutorial just saved me today, thanks so much, your calmness and pace of everything in the way you teach is excellent please keep it up

  • @rajkumararora7366
    @rajkumararora7366 3 месяца назад

    Complex matters explained with simplicity. Thank you for sharing your great work!

  • @anurag0304
    @anurag0304 Год назад +1

    short, to the point, and a nice tutorial. Kudos to Jason and Elysse

  • @STUPIDYOUTUBE_AI
    @STUPIDYOUTUBE_AI 2 года назад +9

    Your tutorial is amazing, very much what I was looking for to create a production-level API with authentication, you explained stuff clearly, very detailed and well-explained and code is easy to follow without complexity and unnecessary filler codes that can be used as a template in corporate APIs. I've had paid subscriptions on Pluralsight and LinkedIn Learning, but the way you teach and this example topples most of the ones I've seen in those paid online courses where all they've done is pad their tutorials with unnecessary junk of codes to make it longer but pretty difficult to implement! I've subscribed and will definitely watch all your videos, thanks and keep it up!

    • @CodeWithJulian
      @CodeWithJulian 2 года назад +5

      Hey Brad! First of of, thank you very much for your kind words. I wish you guys would feel the same way I feel when you leave these nice comments. It truly brings joy and motivation to keep going!
      Secondly, I'm happy that you've found this tutorial valuable, I try to cut the fluff as much as possible, without compromising on essential details on the subject.
      Thank you again for your comment and I hope you have a great day!

  • @mrg4545
    @mrg4545 2 года назад

    It's the subject I've been looking for for a long time and the best resource I've found. Thanks...

  • @kamiladewale5426
    @kamiladewale5426 2 года назад

    Thanks so much Julian for making me understand this easily. Subscribed and will keep following updates here.

  • @insane101gaming7
    @insane101gaming7 2 года назад +1

    Thank you for the simple and effective explanation. I was really stuck on how to decode jwt token to get user detials, and didnt got any perfect solution for this problem. But you did a great job at this.

    • @CodeWithJulian
      @CodeWithJulian 2 года назад

      Glad the tutorial has been helpful to you! Thanks for sharing that!

  • @xSal2oHD
    @xSal2oHD 2 года назад +1

    Perfect explanation , straight to the point ! Thank you

  • @muhammadhydaque2976
    @muhammadhydaque2976 9 месяцев назад

    Just passed by that one and it was so straight-forward for me. Keep it up and thank you for such an awesome content

  • @JollyGiant19
    @JollyGiant19 5 месяцев назад +1

    This is very well done, thank you so much for making this!

  • @albertovelasco495
    @albertovelasco495 2 года назад

    Thank you, Julian, very easy to understand.

  • @bongoSLAP1
    @bongoSLAP1 2 года назад +3

    If you are using .NET 6, add this to your program.cs file
    builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
    .AddJwtBearer(options =>
    {
    options.TokenValidationParameters = new TokenValidationParameters
    {
    ValidateIssuer = true,
    ValidateAudience = true,
    ValidateLifetime = true,
    ValidateIssuerSigningKey = true,
    ValidIssuer = builder.Configuration["Jwt:Issuer"],
    ValidAudience = builder.Configuration["Jwt:Audience"],
    IssuerSigningKey = new SymmetricSecurityKey(
    Encoding.UTF8.GetBytes(builder.Configuration["Jwt:Key"])
    )
    };
    });
    var app = builder.Build();

  • @zoal
    @zoal 2 года назад

    This was exactly what I needed. Great job. Look forward to more.

    • @CodeWithJulian
      @CodeWithJulian 2 года назад

      Thanks for the feedback! More to come shortly!

  • @sebastianlopez5979
    @sebastianlopez5979 2 года назад

    This is a great tutorial. Clear explanation and good examples. Thank you very much.

    • @CodeWithJulian
      @CodeWithJulian 2 года назад +1

      Thanks Sebastian! Happy it's been helpful!

  • @mathewstarr8501
    @mathewstarr8501 2 года назад

    This video was very helpful, thanks for this. Please continue to create more content.

  • @sinan-hoca
    @sinan-hoca Год назад

    I was looking for this for a long time. Watched tons of garbage. Finally I've found the exact video I was looking for. Every single thing I need is in the video. Thanks for sharing this useful tutorial.

    • @CodeWithJulian
      @CodeWithJulian Год назад

      Thanks for your feedback! I'm glad the tutorial was helpful to you.

  • @mohammedbenlaiter2046
    @mohammedbenlaiter2046 Месяц назад

    you saved my graduate project
    thank u

  • @pallyweb
    @pallyweb 2 года назад

    Simply Awesome. Thanks for creating awesome tutorial. Keep great work up.

  • @k.eshwanth7752
    @k.eshwanth7752 2 года назад

    Everything in one go, Thanks for the video.

    • @CodeWithJulian
      @CodeWithJulian 2 года назад

      Thanks for the feedback, glad it was helpful!

  • @sustainedcruelty
    @sustainedcruelty 2 года назад

    Thanks a lot for making this, it really helped me out!

  • @BrandonLackey
    @BrandonLackey 2 года назад

    Thank you. This was super helpful!

  • @kareempr007
    @kareempr007 9 месяцев назад

    Thaks a lot the way of your teaching is so clear and straightforward.

  • @syedalirizvi6162
    @syedalirizvi6162 11 месяцев назад

    Brilliant Explanation you made this topic so simple by your explanation

  • @tiagobiker
    @tiagobiker 2 года назад

    Excelent tutorial, very precise. Thanks !

  • @zahiyoussef2551
    @zahiyoussef2551 3 месяца назад

    the best on youtube that explaine it , the exemples of success and failings , helps a lot , keep it up sir

  • @kurtmullner3488
    @kurtmullner3488 2 года назад

    Perfect, I will use it for my apprentices. Thanks a lot!

  • @sebastiantenorio8602
    @sebastiantenorio8602 2 года назад +2

    Great Tutorial, you should post one where you refresh the tokens.

  • @theweasel7905
    @theweasel7905 2 месяца назад

    Thank you for the great tutorial!

  • @vipulshrivastava1069
    @vipulshrivastava1069 2 месяца назад

    Valuable lesson. Thanks Julian.

  • @JoeScottish
    @JoeScottish Год назад

    Thanks..... I've now created my first Web API thanks to you

  • @ashutoshsingh5568
    @ashutoshsingh5568 2 года назад +1

    Hey Julian, thanks for this informative video. I appreciate your efforts to make this useful content. I liked how you explained all about JWT & authentication in steps.
    Thanks and keep sharing.
    Edit: I subscribed the channel. 😊

  • @javierpetrozzi
    @javierpetrozzi Год назад

    Thanks Julian, you're very clear and tbe video is very useful.

  • @argniests5357
    @argniests5357 2 года назад

    Thanks for the video. Good stuff!

  • @raggardy
    @raggardy 2 года назад

    Fantastic explanation Julian. Subscribed. Nice one, mate

    • @CodeWithJulian
      @CodeWithJulian 2 года назад

      Thanks for feedback! Happy it's been helpful!

  • @moralstories8134
    @moralstories8134 2 года назад

    Thank you so much …this tutorial helped me in my interview …

    • @CodeWithJulian
      @CodeWithJulian 2 года назад +1

      That's wonderful news! Hope you got the job 🥳

  • @RodneyEllisAU
    @RodneyEllisAU Год назад

    this is one of the best tech videos i've watched for a long time!

    • @CodeWithJulian
      @CodeWithJulian Год назад +1

      Thank you for your feedback! I'm happy it's been useful to you!

  • @diyahabdo
    @diyahabdo Месяц назад

    That was so helpful ,Thank you so much .

  • @ertan952
    @ertan952 2 года назад +12

    there is very important point for UseAuthentication method call. The calling order should be like that for net5 and upper versions,
    app.UseAuthentication();
    app.UseRouting();
    app.UseAuthorization();
    Otherwise you will continue to get 401 error due to middleware execution order.

    • @kimjoshuaespanol
      @kimjoshuaespanol Год назад

      Thank you so much for this help !

    • @PrathikaSuvarna
      @PrathikaSuvarna Год назад

      Thank you so much for this comment

    • @divyanshukumar5004
      @divyanshukumar5004 Год назад

      thanks a lot man. I was facing the 401 issue and I really worked so hard to fix it but I was unable to fix it. So lastly I start reading the comments and found urs. Thanks a lot 🎉

    • @IlyaArlenka
      @IlyaArlenka 5 месяцев назад

      Thank you so much!

  • @gayanath009
    @gayanath009 Год назад

    Amazing work. Thanks for the great explanation. May all your work success and shine bright..

  • @arjunm.r8641
    @arjunm.r8641 2 года назад

    @Code With Julian Thanks for the video. This tutorial gave me an idea about JWT tokens implementation

  • @rondolfopresilla6876
    @rondolfopresilla6876 Год назад

    Best tutorial on the subject, thank you bro

  • @mesutdemirci7933
    @mesutdemirci7933 Год назад

    Thank you - this was perfect!

  • @zhangrui2664
    @zhangrui2664 2 года назад

    Your video is very very useful , Thank you!

  • @kamranellahi3517
    @kamranellahi3517 2 года назад

    You are doing great work
    Keep the good work goin brother

  • @user-qe2wd8ri9m
    @user-qe2wd8ri9m 8 месяцев назад

    Simple and Neat explanation, Great Job

  • @patrykklimas4398
    @patrykklimas4398 2 года назад

    Thanks for this video!

  • @anupkumar601
    @anupkumar601 Год назад

    Very clear and easy to understand ..Thanks

    • @CodeWithJulian
      @CodeWithJulian Год назад

      You're welcome, thanks for the feedback!

  • @nginakilonzo6929
    @nginakilonzo6929 8 месяцев назад

    You are so awesome. Thank you! This has been so helpful

  • @taduribhargavi4112
    @taduribhargavi4112 5 месяцев назад

    Amazing Tutorial

  • @thienpham1838
    @thienpham1838 2 года назад

    Thank you very much! This is useful video

  • @trilokpandey2156
    @trilokpandey2156 Год назад

    Nice, you explained necessary code

  • @user-cd2ls5rk9l
    @user-cd2ls5rk9l Год назад

    man, you are awesome. Thank you very much for this video. You are a hero that saved me a lot of time!

    • @CodeWithJulian
      @CodeWithJulian Год назад

      Glad I could help, thanks for the feedback!

  • @AjithChanaka
    @AjithChanaka Год назад

    Thanks, it is a clear teaching.

  • @laxregula9007
    @laxregula9007 Год назад

    Great tutorial. Loved it!

  • @ahmedsaeed5149
    @ahmedsaeed5149 Год назад

    Thank you so much for your excellent tutorial 🖐😄

  • @blagovestkolev7716
    @blagovestkolev7716 Год назад

    It`s nice tutorial ! Not too long, but very useful ! Thanks. Subscribed.

    • @CodeWithJulian
      @CodeWithJulian Год назад

      Thanks for the feeback, much appreciated!

  • @JAH7070
    @JAH7070 2 года назад

    thank you so much for this tutorial!!

    • @CodeWithJulian
      @CodeWithJulian 2 года назад

      You're welcome, happy it't been helpful!

  • @ramiroalegre8183
    @ramiroalegre8183 2 года назад

    Excellent tutorial !!!, my english is basic and i use the automatic provide for youtube translator in spanish and is a really nice, this is because u audio is so god. Thanks :)!

    • @ramiroalegre8183
      @ramiroalegre8183 2 года назад

      Also because the code is understood regardless of the language in which you speak

  • @freeeasyprogramming5151
    @freeeasyprogramming5151 2 года назад

    Big up brother , its a great tutorial

  • @adnanshafi6630
    @adnanshafi6630 2 года назад

    Excellent Sir
    doubts are cleared now

    • @adnanshafi6630
      @adnanshafi6630 2 года назад

      @@CodeWithJulian kindly also share about real world Example for ,Net core Api

  • @deepanshukumar3943
    @deepanshukumar3943 Год назад

    Awesome Awesome just awesome... Amazing video

  • @yogitarameshgate3930
    @yogitarameshgate3930 2 года назад

    Worked perfectly! some detailed explanation about JWT settings might have helped more in understanding internals

    • @CodeWithJulian
      @CodeWithJulian 2 года назад +2

      Great to hear! More JWT videos to come!

  • @amnaterzic5331
    @amnaterzic5331 2 года назад

    This was so precisely explained, well done. Thank You so much for this video. I have one question. If I want to make connection to Postgresql database with Visual Studio, what should I do?

  • @gowthamtj8533
    @gowthamtj8533 10 месяцев назад

    wow amazing tutorial

  • @softexecute
    @softexecute 2 года назад

    in a word it is totally awesome

  • @eyalankri
    @eyalankri 7 месяцев назад

    Thank you!

  • @muharremekimci2208
    @muharremekimci2208 10 месяцев назад

    thank you so much 🙏

  • @_buffer
    @_buffer 2 года назад +2

    Well done! Super clear and to the point! Would you reckon it's a good idea to fetch the data from the Database based on the Username that's passed in with the claims when hitting "AdminsEndpoint"? For instance, let's say someone logged in, was assigned the JWT, and then tried to access their profile settings by entering the endpoint "MyProfile". Would this be a valid way of making sure that it's only accessing it's own page?

    • @CodeWithJulian
      @CodeWithJulian 2 года назад +1

      Hi Payload thanks for the feedback, great channel by the way! This tutorial was to demonstrate how a JWT is generated and composed of, and how to create endpoints that are designated for specific security roles. In an enterprise application I would only pass in the user Id to the _MyProfile_ endpoint. The asp.net core role-based authorization will take care of granting/denying access to that endpoint (based on the JWT stored). Finally, if the user is granted access to that endpoint, they will only ever receive the profile data associated with their user id. Hope this helps!

    • @ruadeil_zabelin
      @ruadeil_zabelin 2 года назад

      @@CodeWithJulian Doesn't that mean that if I take away access, it takes up to 15 minutes for it to apply (or whatever the timeout is set to); since technically the jwt token is still valid and this isn't really being checked every request? Seems a bit risky to me?

    • @CodeWithJulian
      @CodeWithJulian 2 года назад +1

      ​@@ruadeil_zabelin The general consensus is that is best practice to set the expiration time to 15 minutes tops. Feel free to lower that limit depending on the case. Hope this helps!

  • @kaiomaciel8916
    @kaiomaciel8916 Год назад

    that was awesome, Julian! You reminds me the dude from Silicon Valley TV Show xd. I rly appreciate for the video's content.

    • @CodeWithJulian
      @CodeWithJulian Год назад +1

      Haha beautiful, thanks! Glad the tutorial was useful!

  • @Aegisman
    @Aegisman 2 года назад

    Hi Julian, tbh, first video that I watched that went straight to the point w/o to many irrelevant informations, great job. Small question, how much of this is relevant for .NET 6 API (Not minimal)

  • @selcukyazc8450
    @selcukyazc8450 2 года назад

    nice video, thanks for everything :)

    • @CodeWithJulian
      @CodeWithJulian 2 года назад

      Always a pleasure, thanks for feedback!

  • @tiendungnguyen4689
    @tiendungnguyen4689 Год назад

    great, I love it

  • @user-ge2vc3rl1n
    @user-ge2vc3rl1n 2 года назад +1

    This is absolutely perfect and what I was looking for for one of my projects, thank you so much!

  • @MuhammadShaheryar-dx8tj
    @MuhammadShaheryar-dx8tj Год назад

    Great video :)

  • @ROLOGamingOfficial
    @ROLOGamingOfficial Год назад

    Can you authorize controllers instead of doing one end point at the time for admins/other-users?

  • @jeff_9074
    @jeff_9074 2 месяца назад

    I created an asp.net core mvc web application for individual accounts. I abstracted out EF core, and have all the authorization/2FA, pw reset, email authorization, account lockout... etc, handling in place. I eventually would like to create a mobile application to go with it. I planned on having the user use the website for setting up/editing their account personal details, and password changes/reset. I figure right now is a good place to create the Web API and start configuring now common data access/changes the web app and mobile application will use. What is the best way to approach this, and leave the current authorization/authentication in place for the web application, but have it also authenticate to the web api? Thank you!

  • @upendrarajverma6348
    @upendrarajverma6348 11 месяцев назад

    Exact content which i want ❤❤❤❤

  • @jomynn
    @jomynn 2 года назад

    Thank you , work for me.

  • @Harsh-Deshmukh
    @Harsh-Deshmukh 9 месяцев назад

    Short and to the point, Thanks Julian. I have 1 doubt .what is the significance of creating new instance of UserModel in getCurrentUser method in UserController?

  • @lifetransitions9991
    @lifetransitions9991 2 года назад

    well explained. kudos

    • @CodeWithJulian
      @CodeWithJulian 2 года назад +1

      Thanks for feedback, glad it helped!

  • @sponzorusa8660
    @sponzorusa8660 2 года назад

    Thank you 😁

  • @dotnetfullstack3217
    @dotnetfullstack3217 Год назад

    Best Video to learn about JWT TOken Authentication and Authorisation
    1. Simple explanation
    2. Clear command over topic
    3. step by step by explanation
    4. Working code link

    • @CodeWithJulian
      @CodeWithJulian Год назад

      Thanks for your feedback, much appreciated!

  • @fieryscorpion
    @fieryscorpion 2 года назад +1

    Any reason why you didn’t choose .NET 6 since that’s already released and has so much of performance improvements?

  • @ariefmuizzuddin1165
    @ariefmuizzuddin1165 6 месяцев назад

    hi, i have a question. can i use jwt as authentication, then i have 2 client which is web and mobile apps. so when user log in in web it will get access token for that web client, and when the same user log in into mbile apps it will get access token for that app client. therefore if 1 of the client is logged out by the user, the other client shouldnt log out. just want to know is this still correct practice. because i have confused with identityserver, AOuth 2.0

  • @cissemy
    @cissemy 2 года назад

    Great
    I see you added api controller to razor page project.
    How can I make use of the 2 controllers in the razor pages ?

  • @SeleDreams
    @SeleDreams Год назад

    do you have any plans to make a version of this tutorial for blazor server ? because blazor server uses a dfferent workflow from controllers

    • @CodeWithJulian
      @CodeWithJulian Год назад

      Thanks for your suggestion! Sounds good!

  • @michaelacevedo172
    @michaelacevedo172 Год назад

    great Tutotial is just that i need, please have a question how pass this auhorization in a method of mvc, i tell you i put the [Authorize] in one method but altougth im autheticated the response is unauthorized please and thanks for your time

  • @sidraidrees7282
    @sidraidrees7282 Год назад

    any idea, why I am getting below error when I try to access API having [Authorization]?
    System.InvalidOperationException: No authenticationScheme was specified, and there was no DefaultChallengeScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action configureOptions).

  • @BHAILyrical
    @BHAILyrical 2 года назад

    You are legend for me ❤️

    • @CodeWithJulian
      @CodeWithJulian 2 года назад

      Thank you, really means a lot knowing this! Glad the tutorials are helpful to you!

    • @BHAILyrical
      @BHAILyrical 2 года назад

      @@CodeWithJulian ❤️❤️❤️❤️❤️❤️❤️❤️🥰

    • @BHAILyrical
      @BHAILyrical 2 года назад

      Sir if I get any doubts can I send you an email regarding it ?

    • @CodeWithJulian
      @CodeWithJulian 2 года назад

      For sure! 👍

  • @kunying4037
    @kunying4037 2 года назад

    Thank you

  • @ryandriesatria
    @ryandriesatria Год назад

    This is a great video! One thing i want to ask. When you have multiple controllers and you want to get the authenticate user from getCurrentUser method. Where is the best practice to put getCurrentUser method? Do i need to build a repository/service for that and inject it to every controller that will need authentication/authorization? thanks

    • @CodeWithJulian
      @CodeWithJulian Год назад +1

      Yes you could store it in a separate service that's accessible from all your controllers, then, as you say, inject it if/where you need it.

  • @ssovecdezman1317
    @ssovecdezman1317 2 года назад

    THANKS!!!!!

  • @RajVadla
    @RajVadla Год назад

    Hey, Can you please help with encrypting and decrypting the JWT? It doesn't seem to work in dotnet.

  • @phongnguyenphamthanh3106
    @phongnguyenphamthanh3106 3 месяца назад

    I did exactly like you, not missing even a single syntax but keep receiving the "missing of Kid" which is KeyId. Can you help?