Next.js Discord

Discord Forum

(NextAuth) Credentials login for a specific admin/guest role system

Unanswered
MadMenyo posted this in #help-forum
Open in Discord
Hello, for my web app I need users to be able to create "guest" accounts to view certain data. I never really worked with OAuth logins and I am not sure how I can add such functionality if at all possible. Let me draw a scenario.

Admin user needs to create a project with a project-admin account attached to it for his colleague so he can login, configure the project and manage incoming data. project-admin needs to create a "guest" account for the project so the client can login and observe the data.

In my mind, the higher user would generate a specific user role and attach a username/password to it and send that to the lower user. Is this at all possible and user-friendly to do with OAuth API's? In practice, these guest accounts get passed to several users to observe the data. We have guest accounts in 3rd party platforms that we send to dozens of people, using a single user and password for this is nice and quick. I imagine using OAuth accounts we need to force people to log in with Google or whatever other OAuth API's we get. And then somehow grand them the proper role.

Would there be a user-friendly way to do what I want with OAuth services or is the credential login the most practical for this scenario?

0 Replies