I am creating an application on Android in which I am using Firebase as a database. I have three different kinds of users in that which are operators, managers, administrators to each one I want to give different kinds of access to every one of them like operator, manager can view and add data whereas admin can add/delete/view data. I tried using email & auth tab in Firebase but it doesn't allow me to set the type of user on it. I just require help on the aspect on how do I have different login types for different users.
Firebase Authentication (as its name implies) just authenticates the user: it ensures the user is who they say they are. It has no ability to set a specific user type.
To restrict access for user based on their identity requires that you write rules for your database. See https://firebase.google.com/docs/database/security/
The model you're describing is known as role-based security ad has been covered before. After reading the documentation, I recommend searching for more information on that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With