Senior Developer indeed. You are just awesome. You know the flow. If I stay with you for 2month my programming life cannot be the same. You know exactly what you are doing. You know it should work and if it does not work you know why it refuse to work. You are a great Boss and I cut cap for you.
I'm sorry for not getting back to you sooner. I was busy with house renovation and got ill after that. Thanks for the nice words. I will upload more and more videos; hope you enjoy them.
@@Foad_Alavi No problem boss. Sorry about that sir. I just believe you're strong now. Can't wait for more of your videos. You've made me addicted to this challenge already and I really thou love it.
Sensational! Great explanation. I have a question: I need to call the controller of a second application and have it recognize the token generated by the first application. What is the correct way to do this? Can I generate the token in the first application and add it to a session cookie to be read by application 2, or is there a better way?
There are some things I would improve: - Your endpoints are not restful... you shouldn't be using actions as endpoints (as /register or /login). a good restful endpoint would be for example POST /auth and GET /auth - The results for your endpoints should return "Bad Request" only when it's really a bad request... an incorrect login should return 403 Forbidden
You’re most welcome. Do not miss my next two videos in this series. I explained how to use authorization to check permissions. I hope you like them both as well.
I see many WEB API / JWT tutorials but I struggle tying the API JWT together with the user logging in on a web page and using the same token to limit the web front end. Do you have any videos tying these together?
I have recorded another video about identity and authorization. You should find what you asked for there. I need to edit the video first and will publish it by the end of the week.
I just had a question regarding adding an employee model with its own set of fields and allow for authentication of that user. (Since it's separate from the Users table generated by the Identity package)
Usually, the identity context is isolated. I just wanted to demonstrate that we have some other entities there as well. Sometimes, you need to have some other entities or maybe some fields in the user, claim, and roll tables. In the coming videos, about roll and clam-based authorization, I am going to explain it in more detail Thanks for watching my videos and asking the question
Hello . I will use asp. net mvc and web api in my project. I need to display the user who is currently online in some views in MVC. After making these settings in the program cs file of the API, would it be enough if I download the identity package to the MVC project?
showing the online users is a bit tricky. You need to send requests to the server from the clientside every second and notify the server that the user is online Mainly do it using a javascript timer on the clientside. Please consider the performance overhead that it will have on your project.
Nice, but is this the only way to do authentication and authentication in a web api? How about cookie based authentication or another method asides jwt
We have some more ways to do it, I have a playlist about it containing 5 videos about them, and I suggest you watch them. There I explained cookie-based authentication in detail.
First thanks for watching the video. You might have a valid point, I prepared this project for one of the workshops that I gave based on .net 5, some years ago and I used exactly the same code for this video. I will check it and if some libraries are deprecated I will update GitHub repository And check my other videos about refresh token and how to use other encryptions like RSA for validating JWT.
This video is for the Midior level, if you have an issue understanding this one, I highly recommend watching my "ASP.NET Core 7 Authentication and Authorization" playlist
I’m glad that you liked it. You can check the next two videos of the service I explained about implementing permission check and authorization. If you like this video, please share my channel.
Coocke and JWT are 2 different ways of storing the data for authentication on the client side. My advice is to keep them separate. Could you elaborate more about why you have this requirement?
This was an amazing video. Exactly what I needed for my project, and you do such a great job of explaining what you're doing as you're doing it. Do you have a Paypal or some other way I could send you a tip for this?
Hi, I am glad that you liked it and thanks for the nice offer. The best tip for me is to share my channel with other developers. BTW I have five videos about authentication and Authorization, and in the last 2, I explained how I Authorize requests in my projects. You might like them as well.
i have a question if i have a service that i do register and login in there exactly like you said (in Micro services) now how can i use this for other services???
First, sorry for the late response. I was busy with house renovation and got ill after that. You can use encryption techniques like SHA that let you have a Public and Private Key to share them between the login Service(application) and other services(application). I will make a video about it soon.
Hi Jaya, i’m not sure if I got your question correctly or not or even if it is a question or not😉 Depending on the target framework that you have, do you need to select the correct entity framework version.
@@Foad_Alavi Oh Great I haven't ever seen C# syntax So I thought it as Java That's why I posted a comment 😅 But Anyways Thank you @Food Alavi for responding to my comment Most RU-vidrs won't do such things🔥🔥
I'm sorry for not getting back to you sooner. I was busy with house renovation and got ill after that. The concept in this video is the same as in .NET 6,7 and 8.