Gmail account that has been unlinked from phone remains in Firebase authentication page #3551
Unanswered
IncognitoGK9
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Unlinking a gmail.com account (providerID google.com) from a phone is executed successfully. Printing the users data shows the unlinked account still exists in the users account together with the phone off course. Calling reload() does not do anything. This prevents the re-linking if one was to do a test or change the linked account to something else. Note: when gmail is linked, the icon for google is next to the phone icon under the providers column. How do we completely remove the linked email.
method used to link:
linkEmailGoogle() async {
//get currently logged in user
User existingUser = _firebaseAuth.currentUser;
}
Method used to unlink;
unlinkFromGoogle() {
User existingUser = FirebaseAuth.instance.currentUser;
existingUser.unlink("google.com");
existingUser.reload();
}
Printing the details to check after unlinking and reload:
printProviderDetails() {
User existingUser = FirebaseAuth.instance.currentUser;
print(existingUser.email);
print(existingUser.phoneNumber);
for (int i = 0; i < existingUser.providerData.length; i++) {
print(existingUser.providerData[i].providerId);
}
}
this prints: the email address, phone number and provider as phone, I need to remove the email completely.
See attached image:
Beta Was this translation helpful? Give feedback.
All reactions