且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何以编程方式获取Firebase中的注册用户列表

更新时间:2022-12-30 22:14:59

b

解释在这里如果我使用Firebase简单用户名和密码,该如何返回用户列表?密码身份验证



您可以在数据库中将用户的uid设置为 users 该节点存储其他用户的信息。那么你可以得到这个节点下的孩子数。


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?

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.