Mateus Gondim
Mateus Gondim

Reputation: 5532

Firebase - how to update another user's email?

I see in the docs how to update your own email once you are logged in, like so:

FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();

user.updateEmail("[email protected]")
    .addOnCompleteListener(new OnCompleteListener<Void>() {
        @Override
        public void onComplete(@NonNull Task<Void> task) {
            if (task.isSuccessful()) {
                Log.d(TAG, "User email address updated.");
            }
        }
    });

What I want, though, is to be logged in as an user and be able to update the email of another user(The logged in user is an admin). With the approach above that's not possible, because you can get only the current user from FirebaseAuth.

Does anyone know how to achieve that?

Upvotes: 2

Views: 1472

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598728

There is currently no administrative API for Firebase Authentication. We're working on adding this to our server SDKs, but there is no definitive timeline for its availability yet.

Upvotes: 1

Related Questions