Is there a way to list all the users using the firebase admin sdk? Documentation only shows getting one user either by uid or email.
If you want to view a list of users that has registered thru Firebase Auth, you may view them in https://console.firebase.google.com/ then go to your project and select authentication , in the Users list is all the users that have registered thru Firebase Auth.
If the user login with a custom "email/password" you don't know anything else about that user (apart from the unique user id). If a user login with Facebook, or with Google sign in, you can get other information like the profile picture url. It is explained here: firebase.google.com/docs/auth/android/… .
The Admin SDK is a set of server libraries that lets you interact with Firebase from privileged environments to perform actions like: Read and write Realtime Database data with full admin privileges.
The user data for firebase authentication is stored in firebaseLocalStorageDb in IndexedDB .
The latest firebase-admin sdk
(as of now version 5.4.2
) has listUsers
API that would do that. The example is here.
One thing to add to the example, the nextPageToken
has to be omitted or a valid userid. (IMO, it's not obvious in neither the example or the API doc.)
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