How to build role based authentication ? #4282
Sakkhor909
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am new to Next auth. I am trying to build a role-based authentication web application but couldn't get many ideas in the Next auth. I only find this about the role in the doc https://next-auth.js.org/getting-started/client#custom-client-session-handling
Can anyone please give me some idea or tutorial link about creating a role-based system application using Next Auth?
What I want here is that A Super Admin (Me) can be accessed every route and every part of the website. He can send an invitation email to assign a role like an editor, admin. The user will get the invitation by email and can be signup from their with nessecry info added by themself like name, gender, etc.
I am learning Next Auth for a few days and can protect every page by authentication. But how I am able to do it in an invitation way? Right now, everyone can login through an authentication provider without assigning any role to them.
Beta Was this translation helpful? Give feedback.
All reactions