Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically get the list of registered users in Firebase [duplicate]

Tags:

I am working on an android app based on Firebase and I am creating registration using authentication of users with their email addresses and passwords with method signInWithEmailAndPassword, I am able register multiple users and also able to see user on Firebase console. But, I want to get the list of all the registered users on Firebase Auth. I can get the current user using FirebaseAuth.getInstance().getCurrentUser(). But, I want to list all the registered users. So, is there anyway I can get the list of registered users?

like image 214
Lalit Poptani Avatar asked Jul 03 '16 10:07

Lalit Poptani


People also ask

How do I get all users from firebase authentication?

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.

How can I get user details from firebase?

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/… .


1 Answers

You can't

The explanation is here How do I return a list of users if I use the Firebase simple username & password authentication

You can instead set the user's uid to users node in your database, I use that node to store other user's information. then you can get the number of childs under that node.

like image 82
Wilik Avatar answered Oct 12 '22 04:10

Wilik