asp .net core identity | Role based authorization in asp.net core mvc 7

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ธ.ค. 2024

ความคิดเห็น •

  • @ijazkhan-mq4jy
    @ijazkhan-mq4jy ปีที่แล้ว

    "Sir, we appreciate your efforts for us!"

  • @prasadmadushan
    @prasadmadushan ปีที่แล้ว +1

    Very informative, good explanation. thank you

  • @sherlockholmes1121
    @sherlockholmes1121 ปีที่แล้ว

    Very informative, thanks so much. 😀

  • @sivakaran8233
    @sivakaran8233 ปีที่แล้ว

    Thank you so much. It is very helpful to me.

  • @paudricsmith619
    @paudricsmith619 ปีที่แล้ว

    Thank you Ravindra!

  • @AkramAlQaifi
    @AkramAlQaifi ปีที่แล้ว

    Very useful explanation, I hope you explain the user permissions for each role
    Thank you very much.

  • @dianameryl1039
    @dianameryl1039 ปีที่แล้ว

    Thank you so much! ❤ it’s perfect ❤

  • @ericmotard9406
    @ericmotard9406 ปีที่แล้ว

    Good and clear, congrats !

  • @mrkyaing5456
    @mrkyaing5456 ปีที่แล้ว

    Thanks for your contribution to us.

  • @datlam167
    @datlam167 ปีที่แล้ว

    thank you so much it’s so perfect for my project

  • @MuhammadKifayatUllahYounis
    @MuhammadKifayatUllahYounis 3 หลายเดือนก่อน

    very informative thanks

  • @atanasnedkov9570
    @atanasnedkov9570 ปีที่แล้ว

    Great job, well done! You can make a guide on how to check if users are members of an active directory and if they are registered in the system and are part of the active directory then they can log in. Using LDAPS

  • @AnilKumar-fo3tj
    @AnilKumar-fo3tj ปีที่แล้ว

    Thank you so much brother ❤️

  • @bobhitchin
    @bobhitchin 11 หลายเดือนก่อน

    Thanks for a good video - One question: When you added "Jack Doe" as the name and then retrieved it, only "Jack" came back. This is happening in my code as well. Why doesn't the OnPostAsync capture the entire field when editing the profile? I have added the line: user.Name = Input.Name; to the OnPostAsync method. I can see that the correct name is being passed to the: _signInManager.RefreshSignInAsync(user) method, but it never updates the name correctly.

    • @ravindradevrani
      @ravindradevrani  11 หลายเดือนก่อน

      Oh, I never noticed. I will inform you after checking the code.

    • @ravindradevrani
      @ravindradevrani  11 หลายเดือนก่อน

      hi @bobhitchin
      I have check the code and tested it. I am able to update the full name "Jack Doe". I might have fixed it in later part of the tutorial, since I don't remember it now.
      You can find the github repo in the description and test it by urself. I don't see any problem.

  • @tomtommy6132
    @tomtommy6132 ปีที่แล้ว

    Do you have any videos showing how to manage user accounts in the admin area based on what was done in this video?

  • @ucbui5087
    @ucbui5087 ปีที่แล้ว

    Thanks video for me!!!

  • @viru7933
    @viru7933 10 หลายเดือนก่อน

    Where data table come from not showing me in my .net core mvc

  • @geepy5708
    @geepy5708 ปีที่แล้ว

    Can we change the URLs so it doesn’t show the default Identity/Account URLs? We should be able to use our own URLs like /login

  • @MohammadJulfikarRahman-i1p
    @MohammadJulfikarRahman-i1p ปีที่แล้ว

    But if I want to redirect directly to admin view after login where to change?

  • @VinuP2023
    @VinuP2023 2 ปีที่แล้ว

    Thank you
    Pls make a detailed tutorial on jwt authentication

    • @ravindradevrani
      @ravindradevrani  2 ปีที่แล้ว +1

      Already made a video on this topic..also consumed those apis from angular and blazor apps
      Jwt auth video link:
      th-cam.com/video/g2WHURQObzQ/w-d-xo.html

    • @VinuP2023
      @VinuP2023 2 ปีที่แล้ว

      @@ravindradevrani Thank yu. will check it

    • @ravindradevrani
      @ravindradevrani  2 ปีที่แล้ว

      @@VinuP2023 👍👍

  • @osrsmerchant
    @osrsmerchant ปีที่แล้ว

    So if I understand correctly. You add the ApplicationUser class to make it simpler to add in custom stuff to the db, whether it is register info or other new tables? And then the core login will still keep using the IdentityUser for the password hash and all that good stuff that comes with it? Sorry I am very new to all of this.

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว +1

      If you want to add additional fields to User's table of identity (i m not remembering the exact name of table in db); then you have to add a custom class (eg. Application). You can't directly add a property to existing table,created by identity framework.
      For example,i need to add Name property to user table, i have to define it in application context class..
      You can say that,you need some additional fields during registration process,then you have to define application context class with those additional fields.
      Sorry you couldn't understand through the video, i had to explain it there..

    • @osrsmerchant
      @osrsmerchant ปีที่แล้ว

      @@ravindradevrani Thank you for the responds! That cleared it all up :) I learned a lot from the video and was able to add another 7 fields, so I would say it was successful!

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      👍

  • @mohammadjulfikarrahman488
    @mohammadjulfikarrahman488 ปีที่แล้ว

    is there any way, where there is fixed admin, and admin has different view.

  • @coreyb1102
    @coreyb1102 ปีที่แล้ว

    ❤🎉 TY

  • @MuhammadBilal-q6f
    @MuhammadBilal-q6f 3 หลายเดือนก่อน

    bhai bohot shukrya is topic ko cover karne ka. lekin yeh bohot frustrating hai mere lye. cshtml.cs file mai itni complexity hai k main dots connect nahi kar paa raha. beech main lost hojata hun. kuch prerequisites bata do iske taa k video samajh aye. I am beginner in .net core. I have learned asp.net core mvc concepts , Entityframework, and now learning Identify Framework core.

  • @AdnanTahir-l9r
    @AdnanTahir-l9r ปีที่แล้ว

    please make a video on how to add another role for example admin user and one more is vendor so how we can add it

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      Now can not edit video.
      Just define it like the role user. Define it in enum(i guess i have defined roles there)
      Add as much as roles you want.

  • @rehmanmustafa3535
    @rehmanmustafa3535 ปีที่แล้ว

    rolemanager is not workig when i try to register new user

  • @saadanwar7914
    @saadanwar7914 ปีที่แล้ว

    may Allah Bless you!!

  • @markjosephmanalo6455
    @markjosephmanalo6455 ปีที่แล้ว

    Very useful guide is there any way to separate the login and register for admin and user?

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      Sorry i don't know if there is any automatic way of doing this.
      But you can create sections manually, just need to copy the existing code and tweak it according to need.

  • @ricosonic
    @ricosonic ปีที่แล้ว

    Hi,
    In minute 20, when u create a scaffolding I don't have that left side options, do u know why?

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      It should have there..
      I hope you have selected "new scaffolded item" not the "new item"

    • @ricosonic
      @ricosonic ปีที่แล้ว

      @@ravindradevrani im on mac thats why, i think

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว +2

      yeah.. personally I haven't used vs mac.
      this stackoverflow answer may help you. They are saying to run some commands
      stackoverflow.com/questions/63822115/how-to-scaffold-identity-files-in-visual-studio-2019-for-mac

    • @ricosonic
      @ricosonic ปีที่แล้ว

      @@ravindradevrani hello, I have a question about the roles. Instead of giving every new user the role User. Could you do a dropdown list? I tried to implement one but I don't know how to save the value that the user selected and give the corresponding role to the user. Any help?

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      I m not able to understand Clearly...
      I guess you want to assign role to the user manually after user registration from the admin panel.
      Because assigning role shuld be limited to admin access.
      And one more thing, are you able to create roles dropdown..
      And in which page you are doing this

  • @poojasapkal7536
    @poojasapkal7536 ปีที่แล้ว

    I am getting failed to build error . While writing update-database

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      I have two questions in mind?
      1.are you directly trying to run my github project or making your own from Start.
      2.Which version of dot net core you are using?
      because you are getting version related problem in your previous comment.
      You have to use .net 6 or 7 for the project.
      One more thing,if you are directly trying to make projects without learning the basics then create small stuffs first.
      Simple projects with db operations. Then move to other things.

  • @rahulstarkindustries2711
    @rahulstarkindustries2711 ปีที่แล้ว

    How to remove that confirmation mail thing from the project?

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      In registration method,EmailConfirmed = true...
      There should be a code like this,
      var user = new ApplicationUser { UserName = model.Email, Email = model.Email, EmailConfirmed = true, };

  • @sakthisakthi-n7e
    @sakthisakthi-n7e ปีที่แล้ว

    Can we do the same authorization using OKTA

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      Sorry, i haven't tried okta yet.
      There are various ways to authorize, like we can use azure active directory, duende identity server.
      Asp.net Identity ui was the simplest one, thats why i didn't chose it.

  • @KumaresanS-rv7xe
    @KumaresanS-rv7xe ปีที่แล้ว

    But user list not show it

  • @aplikasikependudukanbipabi6308
    @aplikasikependudukanbipabi6308 ปีที่แล้ว

    Add-New Folder-Services-Add-Class-FileServices,, where code from? Help me please,, thanks

  • @talhamohamed3446
    @talhamohamed3446 5 หลายเดือนก่อน

  • @quocvietvii
    @quocvietvii ปีที่แล้ว

    how can i create an admin account without dbseeder

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      You can create it as you have created user account. Just change the role to admin.
      But admin account must be created once. Thats why i have not created any public method for it.

    • @KweziNtikinca-ek5nu
      @KweziNtikinca-ek5nu ปีที่แล้ว

      For other users when you register them like customers you just change their method to public?

  • @subhratchahal8597
    @subhratchahal8597 10 หลายเดือนก่อน

    Ohe veer please keep your mouth and throat clean to prevent the saliva noise

    • @ravindradevrani
      @ravindradevrani  10 หลายเดือนก่อน

      How to clean it..?
      When i talk non-stop during the recording, lot of saliva gathers in my mouth. It is a natural process, I don't have control over it.
      When i realised about the problem, only solution came in my mind is, pause the recording that time.

    • @subhratchahal8597
      @subhratchahal8597 10 หลายเดือนก่อน

      @@ravindradevrani I think the mic must be left or right side while recording not in front of mouth because If mic is little far from the mouth it will not record the tiny voice instead of talk voice, you might have to talk little loud. Just try it once might be a solution.

    • @ravindradevrani
      @ravindradevrani  10 หลายเดือนก่อน

      Hmmm.. i will try..
      Thanks..

  • @kurniaharytz6654
    @kurniaharytz6654 ปีที่แล้ว

    thank u sir, whats the password account admin sir? from dbseeder migrate

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      I don't remember.It must be inside code base.

  • @ppp5921
    @ppp5921 2 ปีที่แล้ว

    Can u explain in Hindi or Bangla or Urdu ?

    • @ravindradevrani
      @ravindradevrani  2 ปีที่แล้ว +3

      Sorry, I can't do that. Though Hindi is my native language, but I want to use a global language, so that it will be beneficial for everyone. Even in India, everyone doesn't understand Hindi very well.

    • @ppp5921
      @ppp5921 2 ปีที่แล้ว

      Make another channel in Hindi

  • @mailsforasif6642
    @mailsforasif6642 ปีที่แล้ว

    Please try to explain why are you doing this? As a beginners its impossible to follow ; if i just copy and paste it dont help me

    • @ravindradevrani
      @ravindradevrani  ปีที่แล้ว

      Can you please tell me, what is the confusing part.
      What should be the approach to make tutorial. I need to figure out the viewer's mindset. So that i can produce better content in future.