Back

Appwrite Auth for Role Based Access Control (RBAC)

  • 0
  • Self Hosted
  • Auth
  • Web
Tanmay Juneja
28 Jun, 2024, 13:02

Hey everyone!

I am looking for authentication access mechanisms for my web app (We're currently using Next-auth for login). We have multiple defined roles for our customers who can access our platform. We want to define different access levels on our app based on these roles. (I want fine-grained access levels in my application for each user. )

  1. Can I use Appwrite Auth to perform this function?
  2. Do I need to make separate API calls to my Appwrite backend everytime to check what type of access does each user have?
  3. Can I use 2FA using Google Authenticator (or other MFA apps) to authenticate user using Appwrite?
  4. If I add 4 different files in my storage bucket, and want to give access to different people of different files, how can I do it? Do I define separate API keys for each user?

Our current solution: We have a database in Appwrite storing all the details about each user and their access permissions. Everytime a user logs into our web app (using next-auth), we check if the user is present in our db and then render web app according to his permissions. Is there a better way to store more granular info about each user?

Thanks in advance!

TL;DR
- Developer looking to implement role-based access control (RBAC) in their web app - Wants to know if Appwrite Auth can be used for this purpose - Questions about making separate API calls for checking user access levels, using 2FA with Appwrite, and granting access to specific files in the storage bucket - Current solution involves storing user details and permissions in an Appwrite database and checking permissions upon login - Looking for a better way to store granular information about each user
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more