Good day, do you guys know how to delete a data from realtime database at the same time with firebase auth account? This code is already working already deleting the data from the Realtime Database only, is there any way on how to delete it alongside with Firebase Authentication account? Basicall my UUID from Firebase Auth and my Child from Realtime DB is the same as well.
holder.btndel_stud.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference("Users");
final DatabaseReference firebaseUser = FirebaseDatabase.getInstance().getReference(FirebaseAuth.getInstance().getUid());
final String uniqueKey = addingStudentsArrayList.get(position).getUniqueid();
final String studentName = addingStudentsArrayList.get(position).getFullName();
databaseReference.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot snapshot) {
databaseReference.child(uniqueKey).removeValue().addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
Toast.makeText(context, "Deleted User From Database...", Toast.LENGTH_SHORT).show();
firebaseUser.removeValue();
}
});
}
@Override
public void onCancelled(@NonNull DatabaseError error) {
}
});
}
});
for reference here's the image of the account in Firebase Authentication

and here's the image of the user's data stored in realtime database.
