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

标签 android firebase firebase-authentication

<分区>

我正在开发基于 Firebase 的安卓应用程序我正在使用方法 signInWithEmailAndPassword 使用用户的电子邮件地址和密码进行身份验证来创建注册,我可以注册多个用户,还可以在 Firebase 控制台上看到用户。但是,我想获取 Firebase Auth 上所有注册用户的列表。我可以使用 FirebaseAuth.getInstance().getCurrentUser() 获取当前用户。但是,我想列出所有注册用户。那么,无论如何我可以获得注册用户列表吗?

最佳答案

你不能

解释在这里How do I return a list of users if I use the Firebase simple username & password authentication

您可以改为将用户的 uid 设置为数据库中的 users 节点,我使用该节点来存储其他用户的信息。然后你可以得到该节点下的 child 的数量。

关于android - 如何以编程方式获取 Firebase 中的注册用户列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38168973/

相关文章:

javascript - 使用 JS 连接到 Firebase 时为 "firebase.database.ref is not a function"

javascript - 如何获取使用 Firebase Google 登录的登录用户的属性?

Android SDK 管理器获取失败

android - 使用 Material Button 会产生 ClassNotFound 运行时错误

android - 如何查看在物理设备上运行的导出 APK 的 Android LogCat 输出?

android - Cordova CLI : Mismatch of CPU architecture

android - FCM 注册在模拟器中工作,但在真实设备上不工作

java - 使用recyclerview的 "onChildRemoved'方法出错

java - 使用 Firebase 身份验证 UID 作为实时数据库中的子节点

javascript - 如何在 React Native 中更新配置文件(displayName)firebase?