[英]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.