我创建了一个 Firebase 应用。
有没有办法在不登录应用程序的情况下通过Uid
获取用户电子邮件?
最佳答案
否,用户必须登录才能根据用户 ID
检索其信息
要获取 uid,您需要执行以下操作:
FirebaseUser user=FirebaseAuth.getInstance().getCurrentUser();
String userid=user.getUid();
根据文档:
public FirebaseUser getCurrentUser ()
Returns the currently signed-in FirebaseUser or null if there is none.
更多信息在这里:
关于java - 从 Uid 获取用户电子邮件,无需登录应用程序 Firebase,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49589791/