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

Поділитися
Вставка
  • Опубліковано 15 жов 2024

КОМЕНТАРІ • 312

  • @mobiletonster
    @mobiletonster  2 роки тому +10

    Be sure to watch Part 2 and 3. If you have questions or need more help, contact me at mobiletonster@gmail.com

    • @durimmiziraj4815
      @durimmiziraj4815 2 роки тому

      It would be really helpful if you would upload your code and link it in the description.

    • @mobiletonster
      @mobiletonster  2 роки тому +4

      @@durimmiziraj4815 if you check the description, I have put a link to the GitHub Repository for the final integration of the 3 parts. github://mobiletonster.com/Authn

  • @EnduroNerd
    @EnduroNerd 2 роки тому +4

    Crisp and clear descriptions of how to do custom auth. Most articles will just thrust entity framework with identity schemes in your face, but this really shows the basic fundamentals and how to do them from the ground up. Fantastic tutorial.

  • @Gonkers44
    @Gonkers44 3 роки тому +1

    Perfect balance of explanation of beginner to advanced topics and not sounding condescending. Not many can pull that off. Great job.

    • @mobiletonster
      @mobiletonster  3 роки тому +4

      Thank you for your kind words. This has been a lot of work to put together and I hope it will help someone. I know it is a complex topic because I had to fight through it myself and I promised that if I ever figured it out I would try to give back to the community who helped me. I just posted Part 2 in the series, so enjoy.

  • @yehia3amer
    @yehia3amer 3 роки тому +19

    That was a really good Tutorial. I really like how you explain things (even trying and doing it wrong to know what went wrong).
    Thanks a lot, waiting for more about this topic.

    • @mobiletonster
      @mobiletonster  3 роки тому +2

      Doing it wrong is the part that comes naturally for me...lol. I just posted Part 2.

  • @karthikreddy3537
    @karthikreddy3537 3 роки тому +8

    i watched over 20 videos regarding Authorization/Authentication,Not even one video i didn't clarity after seeing your video i got clarity what is this Concept about thank you so much,

    • @mobiletonster
      @mobiletonster  3 роки тому

      Thank you for the nice comment. Let me know where you are from and what other topics you would be interested in.

    • @karthikreddy3537
      @karthikreddy3537 3 роки тому +1

      @@mobiletonster hi tony this is karthik from India ,Hyderabad ,I'm in interested in knowing about JWT

  • @lexdxw1989
    @lexdxw1989 2 роки тому +1

    Good. This maybe the most clearest explanation for ASP.NET Core.

  • @ToastyB9
    @ToastyB9 Рік тому

    Tony, I am 45 minutes into your first video. Everything works. I am so grateful for your thorough explanations about this complex topic. I have worked with JWT's and now I decided I want to use cookies. I just want control and don't want to use MSFT Identity so understanding this completely is very important to me. You are the best resource I have found so far. Thank you!

  • @zioncitizen2030
    @zioncitizen2030 2 роки тому

    Best video I've ever seen about Authentication and Authorization. Short, unerstandable with brilliant examples. Thanks

    • @mobiletonster
      @mobiletonster  2 роки тому

      Wow, thanks! That is quite a nice compliment.

  • @simonshen9711
    @simonshen9711 3 роки тому

    You are a good teacher! In fact, I don’t know much about ASP.NET, but when I finished watching this video, I knew the difference between authentication and authorization, and understood how they work in ASP.NET!

    • @mobiletonster
      @mobiletonster  3 роки тому

      Hopefully you found it worth your time. I hope you make amazing things!

  • @franciscogilt
    @franciscogilt 2 роки тому +2

    The best explanation I have seen so far about this topic. Thank you.

  • @Krejstrup
    @Krejstrup 2 роки тому +1

    Loved the pace of this video, and the simplicity of the explanations. Super! Thank you, I'll watch the other ones when I get the time.

    • @mobiletonster
      @mobiletonster  2 роки тому

      Thanks for the compliment. I hope you find it useful.

  • @saurabhd13
    @saurabhd13 3 роки тому

    Only after watching your videos , I understood Authentication/Authorization. Thank you very much.

  • @TheNorthRemember
    @TheNorthRemember 3 роки тому

    the great thing is he show us auth process without adding an identity package and its DB context, thanks Tony

    • @mobiletonster
      @mobiletonster  3 роки тому

      Indeed. While the Identity Package can be useful, over the years I have found that I prefer to either use and Identity Provider (Google, Microsoft, Facebook, Twitter, etc.) or if I must have my own identity system, to use my own so I can easily modify the claims/properties that I want to capture for my users.

  • @OEMPlus
    @OEMPlus 2 роки тому

    im architecting a new system from scratch using .net5 and mvc. This was incredibly helpful. thank you so much.

  • @sarahtsoh862
    @sarahtsoh862 2 роки тому

    this is the best explanation I have seen so far on .Netcore Security

    • @mobiletonster
      @mobiletonster  2 роки тому

      That is a very nice compliment. Be sure to watch parts 2 and 3.

  • @vaibhavachanty3659
    @vaibhavachanty3659 2 роки тому

    Simply amazing. Saw many days for clear explanation. Nowhere i found right one. Finally got the best one. Thanks man 😍

  • @0oShaydo
    @0oShaydo 2 роки тому +1

    Amazing explanation, pace was spot on, it made perfect sense.
    I also feel like having watched it I can jump in where I need to as a refresh as I now build it.
    Thank you 😀

  • @JackLee-zd1vt
    @JackLee-zd1vt 2 роки тому

    By far the best tutorials on this topic, must watch if you are building enterprise ready software. Thanks Tony

  • @sylviogiraldes
    @sylviogiraldes 3 роки тому +13

    Hi Tony. Congratulations on your job. I am quite sure this is the best I´ve ever seen about this subject. Looks like you have a natural gift for being a teacher.

    • @mobiletonster
      @mobiletonster  3 роки тому +2

      Wow, thanks! I appreciate the compliment.

  • @anilgautam1670
    @anilgautam1670 2 роки тому

    You are a hidden Gem Mr. Tony. Your knowledge is truly amazing. Salute to you Sir. This video is really helpful.

  • @paulharrington9673
    @paulharrington9673 3 роки тому +1

    Best explanation of this process I have come across. Just enough detail IMHO.

    • @mobiletonster
      @mobiletonster  3 роки тому

      I'm glad it helped. I hope to do a number of other topics in the future.

  • @ve2tax
    @ve2tax 2 роки тому

    Very good tutorial for me... Everything I saw so far was using the Entity Framework so it gives me an inspiration to do it without EF.. Now need to understand more how to do the same with oAuth and OpenId connect for both a UI and API... Will go watch your other videos... Thanks man again for the video. Well done!

  • @shehan6857
    @shehan6857 3 роки тому +1

    Got clear idea about cookie based authentication. waiting for OpenID as well. Thank you so much. Keep up the good work.

    • @mobiletonster
      @mobiletonster  3 роки тому +1

      I'm glad it helped. I have more videos on the way, but I just posted Part 2 which begins our journey into OpenIdConnect.

    • @shehan6857
      @shehan6857 3 роки тому

      @@mobiletonster thank you for your commitment.

  • @rodrigo6459
    @rodrigo6459 3 роки тому

    YEARS Looking for THIS level of information!! PERFECTION!!

  • @lakshanracing
    @lakshanracing 3 роки тому

    That was amercing, Your are my god. i search this operation 6 day, finally I got your explanation. Thank you again Sir.

    • @mobiletonster
      @mobiletonster  3 роки тому

      Thank You? I'm not familiar with "amercing", but thanks for the compliment? lol. I'm glad it helped. Be sure to watch parts 2 and 3.

  • @TrungNguyen-ld7hz
    @TrungNguyen-ld7hz 3 роки тому +5

    Truly amazing, you're such a gifted teacher.

  • @ricardorocha5118
    @ricardorocha5118 3 роки тому +3

    You really deserve more subs, I loved your way to teach, so clear!

    • @mobiletonster
      @mobiletonster  3 роки тому +1

      Glad you think so! I hope to get back to making more in this series as soon as I get through a major project that I'm building at work.

  • @MarcusHammarberg
    @MarcusHammarberg 2 роки тому

    Brilliant teaching here! A lot of tricky concepts that you describe in a very calm and understandable step-by-step fashion.
    Thank Tony

    • @mobiletonster
      @mobiletonster  2 роки тому +1

      Thanks for the compliment. Very kind of you.

  • @JohnWaclawski
    @JohnWaclawski 2 роки тому

    I'm only about 1/2 of the way through your video and this is great stuff!! You hit the nail on the had for what I was looking for in a tutorial. I plan on watching your other videos as well. Thank you very, VERY much!!! Well done!!!

  • @pyrysaarinen4954
    @pyrysaarinen4954 3 роки тому

    Brilliant usage of those clips to demonstrate difference between Authentication and Authorization

    • @mobiletonster
      @mobiletonster  3 роки тому +1

      Thanks. I hope you found the video useful.

  • @undauntedspirit1
    @undauntedspirit1 3 роки тому +6

    Thank you so much, can't wait for the jwt, openid stuff.

    • @mobiletonster
      @mobiletonster  3 роки тому +6

      I'm working on it right now....OpenID Connect will be the main focus of Part 2.

  • @sbk1398
    @sbk1398 3 роки тому

    Thank you for making .NET's convolution much easier to understand

    • @mobiletonster
      @mobiletonster  3 роки тому

      You are most welcome. .NET is very powerful if you can understand its "convolution" sometimes...lol.

  • @elhamsouri8862
    @elhamsouri8862 3 роки тому +1

    Wow, that's one of the best tutorials I've ever seen!
    Thanks a lot.

  • @ismailjama7440
    @ismailjama7440 Рік тому

    Big thanks sir, really helpful and easy to follow, best Authentication/AuthorizationMVC view I watched

  • @00wiking
    @00wiking 2 роки тому +1

    Thank you. I love it. Nice and simple explained without any unneeded content. Best regards :)

  • @nickeax
    @nickeax 3 роки тому +2

    Thanks for this great sharing of knowledge and process. So often with frameworks it seems the only way to learn is to blindly follow convention, but you show us how to play around with this beast and gain a deeper understanding of what we're actually doing.

  • @Camille-jm2oe
    @Camille-jm2oe 3 роки тому

    Thank you for this wonderful job of teaching us of authentication work on asp net.
    I never found ressources like this on this specific aspect of Asp Net Core.
    Please keep going !

  • @attilaguba856
    @attilaguba856 2 роки тому

    I'm really happy I've found your channel! It's super understandable and clear explanation! Thanks!

    • @mobiletonster
      @mobiletonster  2 роки тому +1

      I'm glad you found it helpful. I just remember struggling through things like Authentication and wished there was a way to break it down into simpler concepts, so when I finally figured out some things, I decided to share it with others. It was hard work to put it together (and scary to be on camera to be honest) but now that I see how many people have benefited from it, it makes it worthwhile.

    • @attilaguba856
      @attilaguba856 2 роки тому

      @@mobiletonster don't worry about the camera you did really well! I like as the way you explained literally step by step! If you consider to make a fully udemy course I'd buy it without hesitation! I really wanted to know how you can make a fully login with registration , forgot and reset password, role based, and even third part login like Facebook or Gmail etc! And what I haven't still found how you can deploy and publish Register and Login pages to an existing website with databases! Only I can find is local host! Aren't you doing private lessons?

    • @mobiletonster
      @mobiletonster  2 роки тому +1

      @@attilaguba856 I wouldn’t call it private lessons but I’m always willing to discuss with people…you can email me at mobiletonster at gmail dot com.

    • @attilaguba856
      @attilaguba856 2 роки тому

      @@mobiletonster thanks very much! I will email you !

  • @srini7690
    @srini7690 3 роки тому

    The 3-part series answered most of my doubts! Thank you very much 😊

  • @marmarrosie6202
    @marmarrosie6202 3 роки тому +1

    You just saved my school project, thank you so much !

    • @mobiletonster
      @mobiletonster  3 роки тому +2

      Great! If you ever need help with your school projects, just reach out. You can DM me on twitter @mobiletonster.

  • @FarazAzhar
    @FarazAzhar 3 роки тому

    Very nicely done Tony. That was just the intro into ASP.NET that I was looking for. Just a quick question; how would you implement a "Remember Me" option in the Login screen?

    • @mobiletonster
      @mobiletonster  3 роки тому +1

      If the user selected the checkbox, I would store their username in a cookie. Then when they returned, I would check for the presence of that cookie and extract the information from it (using javascript) and inject it into the input field for username. I would still require the user to enter a password.

    • @FarazAzhar
      @FarazAzhar 3 роки тому

      @@mobiletonster thanks

  • @clashmasters3270
    @clashmasters3270 3 роки тому

    Very useful, crisp explanations. Keep posting more content on core mvc.

  • @francoislevy441
    @francoislevy441 2 роки тому

    Authorization made simple. Great job !

  • @TheBest-sd2qf
    @TheBest-sd2qf 3 роки тому +2

    Damn that's one of the best tutorials I've ever seen!

    • @mobiletonster
      @mobiletonster  3 роки тому

      Thanks. That is a very kind compliment.

  • @ashutoshsingh5568
    @ashutoshsingh5568 3 роки тому

    Pls zoom a little bit show that viewers can see the content properly.
    Besides that the content is really good and helpful. Thanks

    • @mobiletonster
      @mobiletonster  3 роки тому

      Thanks for your comment. Can you tell me the resolution of the computer you are watching on so I can gauge how large to make the content? It is always tricky to balance as some people are on large 4K monitors and others are on smaller monitors. Hopefully no one is trying to watch code on a mobile device, like a phone. That would be very difficult.

    • @ashutoshsingh5568
      @ashutoshsingh5568 3 роки тому +1

      @@mobiletonster oh my bad. I was using mobile. Actually I came across your channel last night when I was searching filters in MVC.
      I would try your tutorials on my laptop screen.
      Have a great day Mr. Tony.

  • @Raamyy
    @Raamyy 2 роки тому

    Thanks for the video!
    I have a question, why do you switched from IIS to Krestel in the beginning? Is it faster or have any advantage?
    Thanks

    • @mobiletonster
      @mobiletonster  2 роки тому

      Good question. A few reasons (personal preference): 1) It seems to run faster when debugging as it doesn't have to spin up IIS 2) the logging outputs directly to the console making it easy to find and read 3) IIS can sometimes keep running even after the app has stopped debugging and may still be consuming a port so if you open another app to debug, it can't run because the port is still in use. Just a few reasons like that...and probably, mostly habit now.
      However, there are times when it makes sense to run it under IIS Express to test what it will actually work like when deployed onto an IIS Server. Usually there is no difference, but sometimes there is and it is handy to have the IIS Express option to test with, even if it isn't an exact duplicate of full IIS. But most of the time, I prefer just running with Kestrel or with WSL.

    • @Raamyy
      @Raamyy 2 роки тому

      @@mobiletonster Thanks so much for the clarification, I will give it a try!

  • @ChosenHandle
    @ChosenHandle 3 роки тому

    This video is excellent - very clear and concise. Thanks for taking the time to make it!

  • @raagediriye9229
    @raagediriye9229 3 роки тому

    Best teacher i ever had. I hope you make more videos.

    • @mobiletonster
      @mobiletonster  3 роки тому +1

      That is quite a compliment. Thank you!

  • @jinnybat
    @jinnybat 2 роки тому

    This is amazing stuff I have never seen a video like this with so much detail starting from scratch thank you, could you please create content where we have different types of authentication like you covered cookies apart from this like JWT and few others.

    • @mobiletonster
      @mobiletonster  2 роки тому +1

      Thanks for the comment. I have plans to do more videos on other types of authentication...just haven't had the time yet.

  • @renukashiramka9812
    @renukashiramka9812 2 роки тому

    superb...in a easy way you explain such a complicate topic..

  • @Kuller95
    @Kuller95 3 роки тому

    U are the best! Better instructor than those on udemy. Your video saved me at work :)

    • @mobiletonster
      @mobiletonster  3 роки тому +1

      Wow, thanks! Glad to hear that it helped at work. Don't forget to watch parts 2 and 3.

  • @engineererick
    @engineererick 3 роки тому

    Just what I was looking for my company project. Thanks a lot!!

  • @arico94
    @arico94 3 роки тому

    Awesome explanation. One thing I have always had a hard time wrapping my head around is Authorization and Authentication.
    ps. Ogden is beautiful, had the pleasure of attending Weber State there!

    • @mobiletonster
      @mobiletonster  3 роки тому

      I too attended Weber State University and fell in love with the Ogden Valley after growing up in Washington State. I have been here ever since!

  • @sudambandara
    @sudambandara 3 роки тому

    Very well explained! Learnt a lot in this 1-hour session. Thanks heaps

  • @hugoxoft
    @hugoxoft 2 роки тому +1

    After validating myself in OKTA, how did you send the email and username to a session variable?, with Webform

    • @mobiletonster
      @mobiletonster  2 роки тому

      The email and username should be included in the token that comes from OKTA. Then the token claims get extracted during the initial validation phase and those claims get placed inside a cookie. From then on, the Cookie is the authentication "ticket" that contains useful information about the user.

  • @matthewjury6327
    @matthewjury6327 3 роки тому +4

    Marvelous tutorial. Great job.

  • @cyrilmathew4958
    @cyrilmathew4958 3 роки тому

    Good Explanation, thanks Tony Spencer

  • @moneyfresher3035
    @moneyfresher3035 3 роки тому

    Hi Tony, Excellent. Now cookie authentication is clear to me. You have great teaching and presentation skills. I have a question for you. Like cookie authentication, do we have session based authentication in core? I have seen various example of storing the data in session and retrieving back but nowhere found for authentication and authorisation purpose. Does it exists or just used to store the data for state management?

    • @mobiletonster
      @mobiletonster  3 роки тому

      Are you referring to session on the server or in the browser. You can store session in either place, but in today’s cloud world with dynamic scaling, server side session storage isn’t as flexible as it forces a user to alway be connected to a specific server or you must synchronize session across multiple servers. Cookie based authentication scales much better as it isn’t tied to a specific server instance. As for storing something like a token in browser session storage, this is a common pattern however it requires more work from the developer to alway include the token in the header of each request to the server whereas the cookie rides for free on each request (on fetch requests make sure to use “includecredentials” option for cookies)

    • @moneyfresher3035
      @moneyfresher3035 3 роки тому

      @@mobiletonster Thanks for your reply. I was talking about server side session. ultimately session uses cookie to store data in the browser but it is safe when using in memory session. Other than cookie authentication, What other option we have for authentication in MVC ? Because for safety purpose, cookie based authentication assumes to be a bad choice.

    • @mobiletonster
      @mobiletonster  3 роки тому

      Cookies, when used correctly, are a safe option. The key is to
      1. use https,
      2. make sure the cookie is bound to a specific domain
      3. set it to httponly so it can't be read on the client side in javascript
      4. control the security level to be strict or same site, not lax.
      Using these and other techniques such as CSRF tokens to prevent cross site scripting attacks will further improve the security of your site while using cookies.
      Alternatives to using cookies include using JWT tokens added to the Authorization header, but they are really not any safer thank a cookie. Like a cookie, the JWT token is passed in the header, but the JWT token is usually readable by the client side, whereas a cookie can be encrypted so that it is not readable by the client side or browser (httponly).
      If you need store JWT tokens in the browser, don't store them in localstorage (which is a common practice, but not a good idea). Store tokens in sessionstorage or in memory (like in a react state object, or Angular state object) or .... in a cookie (lol).

    • @moneyfresher3035
      @moneyfresher3035 3 роки тому

      @@mobiletonster Thanks Tony. it helped a lot.

  • @burakgunn
    @burakgunn Рік тому

    Dear Tony, thank you. Helped me a lot.

  • @indylawi5021
    @indylawi5021 2 роки тому +1

    great coverage of cookie authen.

  • @cebabu
    @cebabu 3 роки тому

    Hi Hope you are doing well. I have query on authorization. Where do you define all authorization roles. Is done on on your local application. I mean create table and define roles and acesses previlages. Or is it managed at AD. Please suggested provide rferlink on how to manage authorizations.
    I wan t to use MSAL authentication. As the authorization is specific to an application. What is best method to manage authorization. Please suggest.

    • @mobiletonster
      @mobiletonster  3 роки тому

      Part 3 of the series demonstrates both using a local database to store roles as well as using an IDP to store roles. It is similar to using AD for management, which would probably be the preference if you can do it that way.

  • @sebastianamann7131
    @sebastianamann7131 3 роки тому

    Thank you for this!!!!! Exactly what I have been looking for.

    • @mobiletonster
      @mobiletonster  3 роки тому

      Glad to hear! Don’t forget to watch part 2 and 3 for more information.

  • @1KiLeR11
    @1KiLeR11 3 роки тому +1

    Thanks for this video, you helped me a lot

    • @mobiletonster
      @mobiletonster  3 роки тому +1

      I am glad these have helped you and others. I am working on more tutorials as I get free time to work on them. Thanks for watching!

  • @mr.kaleem3328
    @mr.kaleem3328 2 роки тому

    Clappp for you sir Happy understanding 😊

  • @christianvindbk5623
    @christianvindbk5623 3 роки тому

    This is just what i needed for my project, thanks a lot

    • @mobiletonster
      @mobiletonster  3 роки тому

      Great! I'm glad it helped. There is also part 2 and 3 which dive into OpenId/OAuth implementation and connecting a database to house roles, etc. Enjoy!

  • @XpLoeRe
    @XpLoeRe 3 роки тому

    Thank you. making everything so clear and simple..bless you!

    • @mobiletonster
      @mobiletonster  3 роки тому

      You are so welcome! Also, thank you for the blessings!

  • @Uzair_Anwar2299
    @Uzair_Anwar2299 2 роки тому +1

    Really nice tutorial. Love form Pakistan

  • @ramanprajapati5266
    @ramanprajapati5266 3 роки тому

    Good video to understand concepts of Authentication and Authorization

  • @muhammadraza5108
    @muhammadraza5108 2 роки тому

    Thumps-UP Explanation and Way. I wish If I have complete course on Dot Net Core from scratch to Expert Thanks Sir.

    • @mobiletonster
      @mobiletonster  2 роки тому

      Thanks for the feedback. I would actually like to put together a series of videos from basic to advanced. Expert? I don't consider myself an expert, so not sure I can do that part.

  • @1KiLeR11
    @1KiLeR11 3 роки тому

    I had few issue, I download your project from github, but i got error: An ungandled exception occurred while processing the request. Could you help me with that?

    • @mobiletonster
      @mobiletonster  3 роки тому

      Happy to help. If you want to reach out to me and contact me via Direct Message on Twitter, we can connect. My Twitter name is @mobiletonster

  • @NathanWeinrich
    @NathanWeinrich 3 роки тому +1

    Awesome tutorial! Curious, when you "hardcode" the Admin claim in the OnSigningIn event, is this an ok place to get that "admin" flag from a database? or could it get passed from my username/password lookup in the login action?

    • @mobiletonster
      @mobiletonster  3 роки тому

      Yes. In parts 2 and 3 we build up to using a database to get that information and demonstrate using Identity as a service providers like AzureAD or Okta, etc.

  • @JohnWaclawski
    @JohnWaclawski 2 роки тому

    Tony, I have run into one issue. When I log in with the proper information, log out and try to log in again, I get an error that says "ArgumentException: Value cannot be null or empty. (Parameter 'url')" and it highlights this line in my homecontroller.cs: " return Redirect(returnURL);"
    I can "fix it" by going into the history & deleting cookies for the last hour. But this comes right back up again if I log in, log out & try to log in again. Any ideas on this?
    And I love this training. Very well done! Thanks!

    • @mobiletonster
      @mobiletonster  2 роки тому

      Add this line at the beginning of your POST method: returnUrl = string.IsNullorEmpty(returnUrl) ? "/": returnUrl;

    • @esamcoding
      @esamcoding 2 роки тому

      @@mobiletonster i recall that using returnurl like this without validation open your app to redirection attack. don't remember the details.

    • @mobiletonster
      @mobiletonster  2 роки тому

      @@esamcoding I don't think the returnUrl will be an issue here, however, when "POSTING" data from a form to the backend, and when using cookies you should use a XSRF validation token, which I don't demonstrate in this video, but I do have it implemented in the github repo. At some point, I need to do a video specifically about how any why to use the XSRF validation.

    • @esamcoding
      @esamcoding 2 роки тому

      @@mobiletonster URL REDIRECTION - ATTACK

    • @mobiletonster
      @mobiletonster  2 роки тому

      @@esamcoding A simple solution would be to use the builtin method return LocalRedirect(returnUrl) rather than just use Redirect(returnUrl) if you prefer. This method ensures that the returnUrl is part of the local application and not redirecting outside of the application.

  • @gelordtube
    @gelordtube 3 роки тому

    Wow! great explanation, but you'd have explained how to do the assignment of the claims in another Class trying to do the separation of concerns; and Using A database for the usr and pass... event the roles

    • @mobiletonster
      @mobiletonster  3 роки тому

      Thanks. Be sure to watch parts 2 & 3 of this video series. I think it might address your other concerns.

  • @jinnybat
    @jinnybat 2 роки тому

    There is one thing I noticed when I do logout it removes the authentication cookie from the browser only and if I captured this request maybe in fiddler then I get the valid page response with the same logout cookie??

    • @mobiletonster
      @mobiletonster  2 роки тому +1

      If you are talking about cookie based authentication, then logout will only remove that cookie from the browser...that is correct. I'm not following your comment regarding what you are seeing with fiddler. If you want, you can contact me via email mobiletonster at gmail dot com, or on discord mobiletonster#2455

  • @atanuchatterjee4363
    @atanuchatterjee4363 3 роки тому

    Hi Sir I am using VS 2019 community edition version 16.9.3 but I can't see template: asp.net core web application there so unable to follow you in parallel .............Can you please let me know the steps to install some prerequisite s/w to follow you.

    • @mobiletonster
      @mobiletonster  3 роки тому

      I wrote a blogpost that shows how to ensure that you have the proper workloads installed: mobiletonster.com/blog/code/web-workload-for-vs2019-with-visual-studio-installer

  • @caleb5688
    @caleb5688 3 роки тому

    Well made, I only wish I could find something of similar quality on Policy-Based Authorization!

    • @mobiletonster
      @mobiletonster  3 роки тому

      That is a good suggestion. Maybe in a follow up video I can demonstrate some basic Policy-Base Authorization.

  • @vikasgowxda
    @vikasgowxda 2 роки тому

    Take a drink every ti he says “to stay super organized “

    • @mobiletonster
      @mobiletonster  2 роки тому

      And if you do so, you will likely die of thirst.

  • @farisarx5552
    @farisarx5552 3 роки тому

    Thank you so much , you are a great teacher hope you do more tutorials about asp.net

    • @mobiletonster
      @mobiletonster  3 роки тому

      Thank you, I plan to. I have been on a major project at work that has prevented me from getting my next planned video completed. Hopefully I will be able to get back to it soon.

  • @rajaganji7982
    @rajaganji7982 3 роки тому

    This is excellent Tutorial. Excellent.

  • @jchinin
    @jchinin 3 роки тому +4

    Muchas gracias!. Me sirvió de mucho.

  • @YoutubePremium-he1eg
    @YoutubePremium-he1eg 2 роки тому

    After adding my Role identity Identity claim getting null and it remove all claim ?
    What can be a possible result ?

    • @mobiletonster
      @mobiletonster  2 роки тому

      Where are you adding the Role? Maybe reach out to me mobiletonster@gmail.com and we can try to troubleshoot together.

  • @kruhyze
    @kruhyze 3 роки тому

    Thank you I needed this for my project

    • @mobiletonster
      @mobiletonster  3 роки тому

      I hope it was helpful. Be sure to watch parts 2 and 3 as well. There is some good information in those other 2 parts that you may find helpful as well.

  • @guzhouchui936
    @guzhouchui936 2 роки тому +1

    非常棒的视频,我很喜欢,对我帮助很大,谢谢👍

  • @SylvainNtwali
    @SylvainNtwali 3 роки тому

    Is it possible to put the identity logic in a separate DLL/Project so that this can be used in a web or API project? A video that shows this would be great.

    • @mobiletonster
      @mobiletonster  3 роки тому

      Yes it is possible. I wouldn't try to write all that myself as there are some great libraries you can use such as Identity Server4, or Microsoft Identity. If you keep it simple and delegate the authentication to an Identity Provider such as Google, Facebook, Twitter or an IDaaS (Identity as a service) like Azure Active Directory or Auth0 then there shouldn't be much code in your application.

  • @techno7761
    @techno7761 2 роки тому

    Fantastic tutorial. Thank you

  • @venkatratnam8455
    @venkatratnam8455 3 роки тому

    Thanks for the nice tutorial on Authentication. Is there a video on configuring Windows Authentication?

    • @mobiletonster
      @mobiletonster  3 роки тому

      Thanks. I don't have plans to do one on Windows Authentication as it is kind of on its way out. Microsoft is trying to get people to migrate to other authentication methods such as OAuth/OpenIdConnect and using things like Azure Active Directory instead. Do you have a requirement to use Windows Authentication for a project?

    • @venkatratnam8455
      @venkatratnam8455 3 роки тому

      @@mobiletonster Thanks for the reply. We are also planning to use Azure AD for authentication going forward. Is there a tutorial on configuring Azure AD authentication?

  • @4FrogsStacked
    @4FrogsStacked 3 роки тому

    This helped me so much, great video!

  • @juraci73
    @juraci73 3 роки тому +1

    Obrigado Tony pela sua generosidade em compartilhar conosco o seu conhecimento!

  • @carlosreis9775
    @carlosreis9775 2 роки тому

    Very well explained, thank you

  • @huseyincumal5259
    @huseyincumal5259 2 роки тому

    Thank you so much sir, thank you from turkey.

    • @mobiletonster
      @mobiletonster  2 роки тому +1

      You are welcome! Good to hear from Turkey!

  • @garratygarret8559
    @garratygarret8559 3 роки тому

    Wow, was für ein cooles Video. Vielen Dank dafür!

  • @muttBunch
    @muttBunch 3 роки тому

    This is awesome. Thank you. I’m wondering…is there a way to override the ugly old fashioned login dialog box that prompts you in a browser that’s using Windows authentication from IIS? Like using your own custom login page that forwards the Windows authentication through IIS?

    • @mobiletonster
      @mobiletonster  3 роки тому +1

      I'm not aware of a way to override the login box for NTLM. The only thing I know is that you can possibly override it by creating your own login dialog (html) and using LDAP on the backend rather than relying on NTLM, but that is all I know about.

    • @muttBunch
      @muttBunch 3 роки тому

      @@mobiletonster, thanks Tony. I’ll look into that. Thanks again :)

  • @TheBest-sd2qf
    @TheBest-sd2qf 3 роки тому

    How what is magically able to find the "name" property in the user..I know there was a name claim but how did that value get into the user?

    • @mobiletonster
      @mobiletonster  3 роки тому

      The User class that is part of the HttpContext is populated when we create a ClaimsPrincipal object, or rather when the Authentication handler does that. During that time, there are a couple of special fields in the User class: Name and Id (I think I am remembering that correctly). The name maps to a constant in the ClaimTypes.Name and the id maps to the ClaimTypes.NameIdentifier constant. If you hover over these constants you will see that they are actually a long Uri of sorts, perhaps an ISO specification if I remember correctly. The User class is expecting and seeking out any claims that map to these two types. If it sees those present, it will populate the User class accordingly. Perhaps a bit of an oversimplification, but it really isn't magic. If you dig into the source for ASP.NET Core, you will see how they construct the User class that sits on the HttpContext during each request as it passes through the Authentication handler.

    • @TheBest-sd2qf
      @TheBest-sd2qf 3 роки тому +1

      @@mobiletonster Yes ok, thanks a lot

  • @AljRest
    @AljRest 3 роки тому

    Thanks so much for this! you're awesome!

  • @liualex32
    @liualex32 3 роки тому

    Great Teacher! Thanks for your wisdom!

  • @gordsh1
    @gordsh1 2 роки тому

    Trying to do this tutorial in ASP.Net Core but there is no Startup.cs. There is Program.cs but its composition is very different.

    • @gordsh1
      @gordsh1 2 роки тому

      I figured it out. it's just the same but put all code in Program.cs

    • @mobiletonster
      @mobiletonster  2 роки тому

      You should watch my video on "How to deal with the missing Startup.cs file" ua-cam.com/video/vhNhcuht0J0/v-deo.html

  • @superknife0512
    @superknife0512 3 роки тому

    awesome tutorial so far

    • @mobiletonster
      @mobiletonster  3 роки тому

      Glad to hear that! Be sure to watch parts 2 and 3. There is important information in them.

  • @Aayush_Doshi
    @Aayush_Doshi 2 роки тому

    Thanks for the Video it Helped me alot

  • @shenlong0
    @shenlong0 3 роки тому

    Thank You Tony this is a great video!

    • @mobiletonster
      @mobiletonster  3 роки тому

      You are very welcome. Hope it was helpful.

  • @timeforrice
    @timeforrice 2 роки тому

    Amazing tutorial!!