I have a method with which I sign in with Facebook:
void signInWithFB(AuthCredential fbCredential) {
//How to get the the email out off fbCredential object???
// IS RED
auth.fetchSignInMethodsForEmail(email).addOnCompleteListener(task -> {
if (task.isSuccessful()) {
auth.signInWithCredential(fbCredential).addOnCompleteListener(t -> {
if (t.isSuccessful()) {
//Do some stuff
} else {
Lod.d("APP_TAG", t.getException().getMessage());
}
});
}
});
}
I tried to use:
String email = fbCredential.getProvider().getEmail();
But there is no such a function. How can I get the email address out of the fbCredential, So I check out if it already exists?