Authorization in ASP NET Core

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

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

  • @mpauser8399
    @mpauser8399 5 лет назад +7

    I love the way you explain your the best teacher
    .
    can you make tutorial especially deducted for DOM Manipulation as much as possible

  • @lukedodson3441
    @lukedodson3441 5 лет назад +1

    Caught up on all the videos in this playlist, by far the best on here. Thank you and will anticipate the rest of the upcoming videos. thanks again.

  • @רפאלבלזם-לבנון
    @רפאלבלזם-לבנון 5 лет назад

    Thank you very much for tutorials.
    In this video you left the authorize attribute on the controller so we couldn't see if the change in the startup class was worked.
    Thank you again!

    • @naodagere8210
      @naodagere8210 4 года назад

      It works even if you remove that.

    • @rulonoboyev2939
      @rulonoboyev2939 4 года назад

      ​@@naodagere8210 it had to be removed in this lesson as soon as AuthorizeFilter added inConfigureServices

  • @techrelated2417
    @techrelated2417 4 года назад +6

    Hi Venkat, I am big fan of your teaching. You're truly gifted. Thanks for all the efforts you put in to make these videos. Would you make series on Identiryserver4 and also, Microservices (with Ocelot gateway) ? Thanks once again.

  • @00kiss00L
    @00kiss00L 4 года назад +5

    Don't forget to apply [AllowAnonymous] attribute on the Error Controller!

  • @lx405
    @lx405 5 лет назад +16

    Hi venkat, will there also be a playlist about building API's with ASP.NET Core Web Api ? Thanks.

    • @amermagdy5440
      @amermagdy5440 4 года назад

      if you got good one please help me

  • @haydarm.al-samawe9819
    @haydarm.al-samawe9819 5 лет назад

    The course is perfect .. im following this .. just i hope you can add video how to use and watching Sass with asp.net core

  • @iamanalyst4u
    @iamanalyst4u 5 лет назад +2

    hi there Venkat Please post a video on (SSO)Single Sign on with ASP.net core

  • @davenivera8283
    @davenivera8283 3 года назад +3

    Thanks for the explanation. I am new to web dev and I have one question in mind. How does the [Authorize] or the ASP know that the user is now authorized? In the video, there is a login method which makes the user authorized. But how? How does the login make someone authorized?

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

      That's the part that's missing it seems. I came here looking for the same thing.

  • @luismandujano6303
    @luismandujano6303 4 года назад +6

    Hi, when you use Authorize attribute on Home/Create action method .. How does the program know it has to redirect you to the Login view without been especified?

    • @amonra655
      @amonra655 4 года назад

      1+

    • @mohdnorazmil
      @mohdnorazmil 4 года назад +3

      services.ConfigureApplicationCookie(options => options.LoginPath = "/Account/LogIn");

    • @puruk.c.152
      @puruk.c.152 4 года назад +3

      When you use the extension method AddIdentity() in your ConfigureServices method of startup class, by default the login path is hard coded to access account/login implicitly(see line number 53 github.com/dotnet/aspnetcore/blob/1f76cce14ac4e4698a554b65a24f28000b50396e/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs). However if you wish to redirect to other page(or you have your login page other than Account/Login) , you can configure it explicitly within your startup.

  • @mohannepal6503
    @mohannepal6503 5 лет назад +1

    Hi Venkat! Thank you for all hard work that you have been doing for us. Just request, please do 2-3 videos per day.

  • @waelalghazouli8024
    @waelalghazouli8024 3 года назад

    Thank you very much for your amazing explination!

  • @christianloperadecastro4875
    @christianloperadecastro4875 5 лет назад +2

    Thank you for wonderful tutorial. Pls upload part 72. We need more tuts from you.

  • @harithsufri7874
    @harithsufri7874 4 года назад

    Thank you for the detailed explanation!

  • @andikita1976
    @andikita1976 3 года назад

    @kudvenkat I am using windows authentication in an intranet application. I have followed your tutorial, but I want only certain users or only one group to create edit and delete. How can that be done. Looking for your reply.

  • @nolimitsREAL
    @nolimitsREAL 3 года назад

    Does Authorize checks for the token of the user ? I think this is the only way, to check the user. I'm guessing is maintaining a sessions between a front-end and back-end.

  • @ssushovan
    @ssushovan 3 года назад +1

    How does Asp.Net Core know which Controller/Action to route the incoming request to when Authorize attribute is applied? How is it automatically able to determine the Account/Login action method for logging in?

  • @karthikchinni245
    @karthikchinni245 5 лет назад

    Hi Venkat.. I'm a huge fan of you.. your explanation makes everyone feels to be a professional software engineer with your wonderful playlists
    Please do us a favour of staring ReactJS Tutorials too in your style of explanation.. Thanks in advance

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

    great brother!!!!

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

    Hi Venkat, How it is redirecting to Login Screen when you click on Create or Edit buttons after decorating the actions with Authorize attribute. Can you please let me know where this code is written. As in the start up page it is mentioned the default route Home --> Index. For me after clicking on Edit and Create buttons it is redirecting to Error view.

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

      dear i have same issue ,did you find it ?, kindly help me.

  • @MmMm-tg5mq
    @MmMm-tg5mq 5 лет назад

    a little bit confusing I hope that will be clear after watching the rest of videos thanks a lot

  • @justonegoodtrade
    @justonegoodtrade 4 года назад

    Thank you so much for this. Is there a way to add specific authorization if the authenticated user has a certain attribute

  • @fcs_96
    @fcs_96 5 лет назад

    Thanks for your information. Most useful!

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

    Do i implement this in the MVC project or Web Api project if i had to use it?

  • @shahidwani6445
    @shahidwani6445 5 лет назад

    Great

  • @prafulsinghvit
    @prafulsinghvit 3 года назад

    Somebody who understood on how we get redirected to login route, without any configuration, pls let me know, as I am confused on how the application knows that when it sees an [Authorize] filter then it has to redirect to what method ? (there must be some configuration or convention by which it is kicking in the login action method).
    thanks!!

  • @NimbuYT
    @NimbuYT 5 лет назад

    Hi Sir , done all CRUD
    operation except Delete ? can u please help me with this .

  • @wymowaiyan6505
    @wymowaiyan6505 3 года назад

    it doesn't redirect me to login page as you demonstrated. anyone encounter this?

  • @GauravKumar-sr6bt
    @GauravKumar-sr6bt 4 года назад +1

    Where did we configure the URL to login page to which the application redirects if not authorized? If it is default value for login URL, where can we configure it?

  • @pazhanikumar8584
    @pazhanikumar8584 4 года назад

    Dear Venkat,
    How authorize attribute redirects user to login page without any setting or code ? pls any one comment it.

  • @soowenjie3293
    @soowenjie3293 3 года назад

    I follow all the step according to your video but when I login as admin and go to the edit it redirect me to login again. Is there any solution?

  • @aallal73
    @aallal73 3 года назад

    Hello ,
    When a method is not decorated with [Authorize], how does our application know to redirect to the login page?
    Thanks

  • @HH-yq3sy
    @HH-yq3sy 4 года назад +1

    i missed video where you made redirects to login ... can anyone help me here how to add it. Thanks

    • @HH-yq3sy
      @HH-yq3sy 4 года назад

      I figure it out. When you set service.AddIdentity its has been automaticly set to open method which has [AllowAnonymous]. If login is only method with it then it will open login page

  • @vivekanandamaity5568
    @vivekanandamaity5568 5 лет назад

    Sir please tell us about jQuery from validation.

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

    Hi sir big fan
    xD

  • @TheAhmedasdasd
    @TheAhmedasdasd 4 года назад

    How to configure Authorization globally in Asp.net Core 3 ?

  • @snailzao
    @snailzao 5 лет назад

    How can you generate accountcontroller?

  • @conaxlearn8566
    @conaxlearn8566 4 года назад

    How does .Net core know where the login page is? Just by looking for an action called "Login" within all the controllers?

    • @jayasantosh9787
      @jayasantosh9787 4 года назад

      same here, please can you explain if your issues is resolved

    • @conaxlearn8566
      @conaxlearn8566 4 года назад +1

      @@jayasantosh9787 I think source code line 53 on this page is the answer:
      github.com/dotnet/aspnetcore/blob/1f76cce14ac4e4698a554b65a24f28000b50396e/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs
      But I have not worked out how to set a different login page.

  • @sachingreat222
    @sachingreat222 4 года назад

    How it is redirect to login page on click of edit button

  • @hanspetervollhorst1
    @hanspetervollhorst1 3 года назад

    I don't really understand how ASP.NET Core knows that /Account/Login is where the user can enter his login details

  • @ingvarderesivski8907
    @ingvarderesivski8907 4 года назад

    I added Authorize attribute and made login and unable to access to Authorize views. I am using Core 3.2

    • @ramakrishnamb3045
      @ramakrishnamb3045 4 года назад

      In startup.cs add this line : app.UseAuthorization(); after app.UseAuthentication

    • @javaguitarist
      @javaguitarist 4 года назад +2

      For .net core v3.1+, app.UseAuthorization() must be between app.UseRouting() and app.UseEndpoints() in Startup.cs.

  • @o_nasrsaad2067
    @o_nasrsaad2067 3 года назад

    How The [Authorize] know that if user not login which redirect login page?
    For more Clear for what I need
    How it know AccountController And Login Action?

  • @milandjukic88
    @milandjukic88 4 года назад

    How authorize attribute knows where is login page? Is this default Account/Login?

    • @amonra655
      @amonra655 4 года назад

      if you get answer please tel me

  • @acegaming5317
    @acegaming5317 5 лет назад +1

    Can u make a video on mvc login page?? plzz reply sir

  • @samarakhan1574
    @samarakhan1574 5 лет назад

    my application is not redirecting me to a login page but it gives 401(unauthorized) error.
    please help me fix this.

    • @enanobap
      @enanobap 5 лет назад

      Hi asamara
      add this code in yout start up
      services.ConfigureApplicationCookie(options =>
      {
      options.Events = new CookieAuthenticationEvents
      {
      OnRedirectToLogin = x =>
      {
      x.Response.Redirect("Account/Login");
      return Task.CompletedTask;
      }
      };
      });

    • @AbPoonamhi
      @AbPoonamhi 5 лет назад

      @@enanobap After adding above code, still unable to redirect to Login Page. Help Needed.. Thanks in Advance.

    • @connerm8443
      @connerm8443 5 лет назад

      @@AbPoonamhi Hi Poonam,
      Is the controller handing your Account/Users called "AccountController"? The default route is "/Account/Login" I believe and if you have named your controller differently this might cause an issue? You can set a custom redirect path using the following method in the ConfigureServices method in Startup.cs:
      services.ConfigureApplicationCookie(options =>
      {
      options.LoginPath = "/Controller/Action";
      });
      Hope this is of help!

    • @radhagobindamishra4649
      @radhagobindamishra4649 5 лет назад +1

      @@AbPoonamhi Apply AllowAnonymous attribute to Both Login Action methods.

    • @Fkn1405
      @Fkn1405 3 года назад

      Have you added these middleware in your configure method??
      app.UseAuthentication();
      app.UseAuthorization();
      app.UseEndpoints(endpoints =>.........

  • @dkisov1
    @dkisov1 4 года назад

    ReturnUrl is not binding. Help ?

  • @swathichittani8341
    @swathichittani8341 3 года назад

    is source code available ?

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

    Do you have an Udemy Course, if not you should have one, can become rich!!!!