In others Firebase version with removeUser we can delete an user only using email and password. With the new Firebase version it seems you can only delete and user if you have c
The Firebase SDK for Android can only delete the currently logged in user. So if you know the user's email+password, you'll have to sign in as that user to delete the account.
For admin functionality you should use the Firebase Admin SDK, which you should run on a trusted back-end server. Authentication functionality currently is only available in the Firebase Admin SDK for Node.
Finally the code should be something like this
mAuth.signOut();
mAuth.signInWithEmailAndPassword(email,password)
.addOnCompleteListener(UserList.this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (!task.isSuccessful()) {
mAuth= FirebaseAuth.getInstance(myFirebaseRef.getDatabase().getApp());
try{
mAuth.signInWithEmailAndPassword(getsPreferences().getString("mailUser",""), getsPreferences().getString("pwd",""))
.addOnCompleteListener(UserList.this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
}});
}catch(Exception e){
}
}
}});