如何以编程方式获取Firebase中的注册用户列表 [英] How to programmatically get the list of registered users in Firebase

查看:543
本文介绍了如何以编程方式获取Firebase中的注册用户列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个基于 Firebase 的Android应用程序,我正在使用用户身份验证来创建注册电子邮件地址和密码与方法 signInWithEmailAndPassword ,我可以注册多个用户,也能够在Firebase控制台上看到用户。但是,我想获取所有在Firebase身份验证注册用户的列表。我可以使用 FirebaseAuth.getInstance()。getCurrentUser()获取当前用户。但是,我想列出所有注册用户。那么,有没有办法,我可以得到注册用户列表?

解决方案

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.

这篇关于如何以编程方式获取Firebase中的注册用户列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆