Mastering Role Based Access Control in NestJS

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

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

  • @adriantworek1057
    @adriantworek1057 3 месяца назад +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  3 месяца назад +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 3 месяца назад +1

      yeah it's actually a great idea.

    • @dreamsachiever212
      @dreamsachiever212 3 месяца назад +1

      @@SakuraDev would love to see that as well

  • @andrejkling3886
    @andrejkling3886 3 месяца назад +1

    Excellent explanation and awesome content 🔥💯thank you

    • @SakuraDev
      @SakuraDev  3 месяца назад

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

  • @amritniure465
    @amritniure465 2 месяца назад

    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  2 месяца назад +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 2 месяца назад

      @@SakuraDev You are such a great instructor.

    • @SakuraDev
      @SakuraDev  2 месяца назад +1

      @@amritniure465 Thank you so much 😊🙏

  • @ysdev___
    @ysdev___ 3 месяца назад

    Amaizing course! I wait a next video! Thanks!

    • @SakuraDev
      @SakuraDev  3 месяца назад +1

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

  • @GhassanSuhail
    @GhassanSuhail 2 месяца назад

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

    • @SakuraDev
      @SakuraDev  2 месяца назад

      Hi, thank you, I will do that

  • @wakeupcoffee2410
    @wakeupcoffee2410 2 месяца назад

    Great course. Thank you!

    • @SakuraDev
      @SakuraDev  2 месяца назад

      Thanks for your support 🙏🙏

  • @RezaDev8
    @RezaDev8 Месяц назад

    Thank you for this great course. It was perfect

    • @SakuraDev
      @SakuraDev  Месяц назад +1

      Thanks. I'm really glad you liked it

  • @lingadurai5805
    @lingadurai5805 2 месяца назад

    Thank you so much

  • @stnost6897
    @stnost6897 Месяц назад

    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?

  • @AbdiwahabMohamed-n1n
    @AbdiwahabMohamed-n1n 3 месяца назад

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

    • @SakuraDev
      @SakuraDev  3 месяца назад +1

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

    • @AbdiwahabMohamed-n1n
      @AbdiwahabMohamed-n1n 3 месяца назад

      @@SakuraDev Thank you waiting for another videos

    • @SakuraDev
      @SakuraDev  3 месяца назад

      @@AbdiwahabMohamed-n1n awesome

  • @VidushaSanidu
    @VidushaSanidu 3 месяца назад

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

    • @SakuraDev
      @SakuraDev  3 месяца назад +1

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

  • @FejkMarcin1212
    @FejkMarcin1212 2 месяца назад

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

    • @SakuraDev
      @SakuraDev  2 месяца назад

      Could you give me an example?

    • @FejkMarcin1212
      @FejkMarcin1212 2 месяца назад

      ​@@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 2 месяца назад

      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  2 месяца назад +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 2 месяца назад +1

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