Firebase fetchSignInMethodsForEmail not providing phone auth

Viewed 28

After user register my app with phone auth, I am having trouble to detect if user exist on firebase. I have set an email address for the user and then call fetchSignInMethodsForEmail, but it is not returning phone provider. Do we have any other method that I can use to detect if user has phone auth provider for flutter?

1 Answers

firebase here

The fetchSignInMethodsForEmail function returns the email-based provider that are associated with the account. So if you link any email-based provider with the phone-based account it will show up, but you won't ever get back the phone auth provider.

If you need that type of mapping, consider storing it in your own database. It also sounds like a reasonable use-case, just not one the current was meant for, so I recommend filing a feature request

Related