Next.js Auth with Roles & Permissions (RBAC / Authorization) - Protect your app the professional way

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

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

  • @BliitzPint
    @BliitzPint 5 หลายเดือนก่อน +10

    I like this but I’m a bit concerned of what happens when the Kinde servers are offline for some reason. Then my whole app doesn’t work anymore, right? I don’t like it when my auth logics depends on a third party service. I mean it’s very essential.

  • @bibblebabl
    @bibblebabl 5 หลายเดือนก่อน +19

    Unfortunately, using sas for auth and authorization is not something that startups and even more so medium-sized companies are willing to sacrifice. if, for example, emailing or file uploading can be left to sas, but users, their administration and so on is unlikely. it would be great if another player or library appeared on the market that solved the authentication problem well. we only have two big things right now, right? next-auth and lucia. the former is still very raw and confusing, and the latter has less support and poor documentation

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

      Not to mention adding another point of failure to your application.

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

      No one should ever use SAAS for auth or databases for anything that is not a small hobby project. All these companies are just selling shovels in a gold rush.

    • @MerthanMerter
      @MerthanMerter 3 หลายเดือนก่อน +1

      outsourcing auth is crazy.

  • @eladr_
    @eladr_ 5 หลายเดือนก่อน +4

    Great video! Thanks for the comprehensive explanation on managing roles and permissions with Kinde.
    I have a question: could you make a video showing how an admin can create accounts for other users, like clients, support agents, or sales representatives? Specifically, I'm interested in the admin selecting a role from a list (e.g., client, support agent, representative) when creating these accounts. Is this possible with Kinde, and if so, how can it be implemented?
    I have a use case where only the admin can create all the accounts, and other users can just sign in.
    Thanks in advance

  • @Aziz-kw6ct
    @Aziz-kw6ct 2 หลายเดือนก่อน +1

    Great Tutorial! thank you.

  • @huzaifaqayyum786
    @huzaifaqayyum786 5 หลายเดือนก่อน +2

    can we have class based server actions? to support inheritance etc?

  • @ZitoxLD
    @ZitoxLD 5 หลายเดือนก่อน +2

    0:35 is there a way with Kinde to integrate the login form inside our app as a component, instead of redirecting the user outside our app (in order to keep the layout/header/flooter etc.) ?

    • @floristrading8418
      @floristrading8418 5 หลายเดือนก่อน +1

      if its an oath2 login then No,
      if its an email based login then yes

  • @adel.dev.account
    @adel.dev.account 3 หลายเดือนก่อน

    I've learned a lot, thanks

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

    How when each users has it's own staff how can I do it using kinde?

  • @brutalcodm4605
    @brutalcodm4605 5 หลายเดือนก่อน +2

    i need to set user role when user is signup. as an example think about job vacancy site. when user is registering user can select whether he is an employer or an employee. like that. can this be achieved by kinde auth.

    • @KkrDs97
      @KkrDs97 5 หลายเดือนก่อน +1

      I have been trying for similar thing with next-auth but unfortunately no success. There is so no direct way, dynamically adding roles has become tough.

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

      @@KkrDs97 I also have the same requirement, how did you achieve this?

  • @farzadmf
    @farzadmf 5 หลายเดือนก่อน +1

    Can't we combine the two calls? `const { isAuthenticated, getPermission } = getKindeServerSession();`
    Seems redundant to do them separately

    • @BliitzPint
      @BliitzPint 5 หลายเดือนก่อน +1

      Why do you think it’s two calls? It IS just one function call, it just returns a complex object.

    • @farzadmf
      @farzadmf 5 หลายเดือนก่อน +1

      If I remember correctly, in the video, there's a line doing `const { isAuthenticated } = ...`, then another line doing `const { getPermission } = ...`; that's why I said two calls (because on two separate lines)

    • @MerthanMerter
      @MerthanMerter 2 หลายเดือนก่อน +1

      @@farzadmf you might not want to integrate permissions though. so u would only do auth checks

    • @farzadmf
      @farzadmf 2 หลายเดือนก่อน

      @@MerthanMerter Ah OK, makes sense

  • @PhilanJames
    @PhilanJames 5 หลายเดือนก่อน +1

    Would be awesome to have some SolidJS && SolidStart content.

  • @letsgetstarted.05
    @letsgetstarted.05 5 หลายเดือนก่อน +1

    Please build a project where you'll need to host an extra Express server along with Next.js

  • @smit359
    @smit359 5 หลายเดือนก่อน +3

    I m first 🥇