I need to delete a Firebase Auth record, I'm using the following code:
FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
user.delete().addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
}
});
But you're giving an error:
java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.tasks.Task com.google.firebase.auth.FirebaseUser.delete () 'on a null object reference
Does anyone know what I'm doing wrong or how do I delete a Firebase Auth record?