简体   繁体   English

如何在特定用户android的Firebase身份验证上更改电子邮件ID

[英]How to change email id on Firebase Authentication of a particular user android

This is how i am changing the email id of current user 这就是我更改当前用户的电子邮件ID的方式

        FirebaseUser user = mAuth.getCurrentUser();
        user.updateEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {
            @Override
            public void onComplete(@NonNull Task<Void> task) {
            }
        });

It is working fine 一切正常

Now i want to change email id of another user(other then the current user) i have the UID of that user 现在我想更改另一个用户(当前用户以外的用户)的电子邮件ID,我拥有该用户的UID

is it possible ? 可能吗 ?

Changing the email address for a user that is currently not logged into Firebase Authentication can only be done through the Firebase Admin SDK. 只能通过Firebase Admin SDK更改当前未登录Firebase身份验证的用户的电子邮件地址。 If this was possible in the Android SDK based on just the UID of the user, that would be a serious security risk (as UIDs are not an authentication mechanism ). 如果在仅基于用户UID的Android SDK中可行,那将带来严重的安全风险(因为UID不是身份验证机制 )。

For an example of updating an email address through the admin SDK, see updating a user . 有关通过admin SDK更新电子邮件地址的示例,请参阅更新用户

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 Firebase 电子邮件身份验证中获取电子邮件的用户 ID - How to get the user id of a email from firebase email authentication 使用单个电子邮件ID的所有应用程序用户的Android Firebase身份验证 - Android firebase authentication for all app users using single email ID 使用 Android 进行 Firebase 电子邮件和密码身份验证 - 用户注册 - Firebase Email and Password Authentication with android - User sign up Firebase android 用户身份验证 - Firebase android user authentication 如何允许电子邮件ID在firebase中接收OTP以进行身份​​验证 - How to allow email id to receive OTP in firebase for authentication 如何通过用户电子邮件 Firebase android 获取用户 ID? - How to get userID by user Email Firebase android? 如何使用Firebase电子邮件/密码身份验证获取UID并添加用户信息 - How to get UID and add user information with Firebase email/password authentication Firebase身份验证(电子邮件和密码)如何检查用户是否仍然存在? - Firebase Authentication (email and password) How to check if user still exists? 如何确定 Firebase 用户是否使用电子邮件和密码身份验证登录 - How to determine if a Firebase user is signed in using email and password authentication Firebase Authentication ( Email & Password ) 如何查看现有用户 - Firebase Authentication ( Email & Password ) how to check existing user
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM