[REQUIRED] Describe your environment
- Operating System version: any
- Browser version: any
- Firebase SDK version: 7.22.1
- Firebase Product: auth
[REQUIRED] Describe the problem
The fetchSignInMethodsForEmail()
method is not returning the ‘phone’ method (auth.PhoneAuthProvider.PHONE_SIGN_IN_METHOD
). I’m only getting ['facebook.com', 'password']
, but when I inspect the providerData
property of currentUser
, ‘phone’ provider is listed:
(Similar to #3856)
Steps to reproduce:
console.log(auth().fetchSignInMethodsForEmail(currentUser.email))
[
"password",
"facebook.com"
]
console.log(currentUser.providerData)
[
{
"uid": "xxxxx",
"displayName": "xxxxx",
"photoURL": "https://graph.facebook.com/xxxxxxxx/picture",
"email": "xxxxxxxx@gmail.com",
"phoneNumber": null,
"providerId": "facebook.com"
},
{
"uid": "+xxxxxxxxxxxxx",
"displayName": null,
"photoURL": null,
"email": null,
"phoneNumber": "+xxxxxxxxxxxx",
"providerId": "phone"
},
{
"uid": "xxxxxxx@gmail.com",
"displayName": null,
"photoURL": null,
"email": "xxxxxxx@gmail.com",
"phoneNumber": null,
"providerId": "password"
}
],
Is this intended or there is a way to get all providers for same user of email?
Here is the response from Firebase team: