0

We're using Expo Firebase Phone Authentication. We're able to authenticate users using the firebase sdk, so when a new phone number signs up for the first time, we add that phone number to the Users section of the firebase console. However some of these phone numbers need to be marked as admin. Is there any way to do that from the firebase console?

Huzan Toorkey
  • 185
  • 1
  • 9

1 Answers1

1

If you are talking about marking particular users as an admin in the Authorization tabs, then no, this is not currently possible.

If you are looking for ways to do role-based authentication, there are many tutorials available on how to do this. But to summarize, there are three main methods for role-based authentication with Firebase.

Device (Client SDK) Server (Admin SDK) Console Relative Difficulty
Realtime Database read/write¹ read/write read/write High
Cloud Firestore read/write¹ read/write read/write Low
Token-based read-only² read/write not visible Medium

¹: Using these methods, another admin could add/remove admins from the client side if desired.

²: While the client SDK can not edit a user's authentication token, you could use a Cloud Function or your own private server to edit a user's token from the client if they have the appropriate permissions.

samthecodingman
  • 23,122
  • 4
  • 30
  • 54