Mastering Role Based Access Control in NestJS

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

КОМЕНТАРІ • 34

  • @amritniure465
    @amritniure465 4 місяці тому

    Really Appreciate it Man.
    The way you show the underlying error first and solve it later helps understand the topic and logic behind it better. And your explanation to each predefined functions like why .gethandler() is used why getclass() is used makes it more clear and logical. Hats off to you mate. Hope you get what you deserve.

    • @SakuraDev
      @SakuraDev  4 місяці тому +1

      Thank you so much for the kind words! 🙏 I'm glad that approach helps you understand the concepts better. I'll keep aiming to make everything as clear and logical as possible. Your support means a lot ❤️🙏

    • @amritniure465
      @amritniure465 4 місяці тому

      @@SakuraDev You are such a great instructor.

    • @SakuraDev
      @SakuraDev  4 місяці тому +1

      @@amritniure465 Thank you so much 😊🙏

  • @adriantworek1057
    @adriantworek1057 4 місяці тому +3

    Awesome series bro! It's cool that you wanna add social authentication also.
    For me, the last missing piece to make it the best NestJS series out there is to make the authentication support also mobile auth (web - httpOnly cookies, mobile - Authorization header) and manage the flow on multiple devices (also with "Sign out from all devices") feature. Thank you!

    • @SakuraDev
      @SakuraDev  4 місяці тому +3

      Thank you! I'm glad you're enjoying the series. Adding support for mobile authentication and managing multi-device flows is a great idea. I'll look into it and make sure to cover these topics in upcoming videos. Stay tuned, and thanks for the suggestion! 🚀😊

    • @dreamsachiever212
      @dreamsachiever212 4 місяці тому +1

      yeah it's actually a great idea.

    • @dreamsachiever212
      @dreamsachiever212 4 місяці тому +1

      @@SakuraDev would love to see that as well

  • @RezaDev8
    @RezaDev8 2 місяці тому

    Thank you for this great course. It was perfect

    • @SakuraDev
      @SakuraDev  2 місяці тому +1

      Thanks. I'm really glad you liked it

  • @Mahadev-x7u
    @Mahadev-x7u 4 місяці тому +1

    Excellent explanation and awesome content 🔥💯thank you

    • @SakuraDev
      @SakuraDev  4 місяці тому

      Thank you so much! I'm glad you enjoyed it. Your support means a lot! 🔥💯😊

  • @wakeupcoffee2410
    @wakeupcoffee2410 4 місяці тому

    Great course. Thank you!

    • @SakuraDev
      @SakuraDev  4 місяці тому

      Thanks for your support 🙏🙏

  • @ysdev___
    @ysdev___ 4 місяці тому

    Amaizing course! I wait a next video! Thanks!

    • @SakuraDev
      @SakuraDev  4 місяці тому +1

      Thank you so much! I'm glad you're enjoying the course. More videos are on the way. Stay tuned! 😊

  • @GhassanSuhail
    @GhassanSuhail 4 місяці тому

    Great Course! Would love to see a tutorial deploying a Nest/Next App

    • @SakuraDev
      @SakuraDev  3 місяці тому

      Hi, thank you, I will do that

  • @lingadurai5805
    @lingadurai5805 4 місяці тому

    Thank you so much

  • @AdityaSharma-t3c
    @AdityaSharma-t3c 29 днів тому +1

    23:50 I guess we didnt actually removed the data from Neon Db and actually just simulated the deletion, as i rechecked my db and it was still there. I was stuck here thinking why isnt neon db working ?LOL

  • @stnost6897
    @stnost6897 3 місяці тому

    Dear @Sakura Dev what about if we wanna to adding some custom roles to exist ones, for example. And what if we want to add permissions to this roles dynamically? What's the flow gonna be?

  • @VidushaSanidu
    @VidushaSanidu 4 місяці тому

    Bro Can't we add the role into the payload of the JWT?

    • @SakuraDev
      @SakuraDev  4 місяці тому +1

      Yes we can! but it is safer to get the role directly from db.
      Thanks for vesting btw❤️

  • @AbdiwahabMohamed-n1n
    @AbdiwahabMohamed-n1n 4 місяці тому

    Thanks sir, when i using prismaORM is it same like this

    • @SakuraDev
      @SakuraDev  4 місяці тому +1

      Yes, definitely. You just need to get the user with prisma form db

    • @AbdiwahabMohamed-n1n
      @AbdiwahabMohamed-n1n 4 місяці тому

      @@SakuraDev Thank you waiting for another videos

    • @SakuraDev
      @SakuraDev  4 місяці тому

      @@AbdiwahabMohamed-n1n awesome

  • @FejkMarcin1212
    @FejkMarcin1212 4 місяці тому

    What about if Roles have nested permissions? How to handle it in NestJS?

    • @SakuraDev
      @SakuraDev  4 місяці тому

      Could you give me an example?

    • @FejkMarcin1212
      @FejkMarcin1212 4 місяці тому

      ​@@SakuraDev e.g if we have two admins in our system, and only one admin can edit the let's say a form in UI, and the second one cannot. If we would have a role Admin with permisson: CAN_EDIT_CONFIG_FORM: true so only the admin which has this permission can edit form.

    • @FejkMarcin1212
      @FejkMarcin1212 4 місяці тому

      Second example: Admin role can have a different permissions to different modules in our system, e.g. one admin can enter a Configuration View in frontend, but the second one cannot. How to distinguish which one can enter this view in front-end? My guess, is that only with permission which is related a role.

    • @SakuraDev
      @SakuraDev  4 місяці тому +1

      Well, in this case it's better to use policy based access control. We assign permissions to the user and then we check if a specific user has a certain permission to access an API

    • @FejkMarcin1212
      @FejkMarcin1212 4 місяці тому +1

      @@SakuraDev Would you please cover this in this course?