Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

firebase user provider data? #196

Closed
AntonioRossi opened this issue Oct 30, 2016 · 5 comments
Closed

firebase user provider data? #196

AntonioRossi opened this issue Oct 30, 2016 · 5 comments
Assignees
Milestone

Comments

@AntonioRossi
Copy link

I could not find it in the documentation, is it possible to get the info of the provider from which the user authentication was authorized?

Let's say for example something similar to getProviderData() of the class FirebaseUser in adroid, analogous to Fireuser.providerData in the iOS version.

@EddyVerbruggen
Copy link
Owner

Out of curiosity: what kind of data of which provider are you after?

@AntonioRossi
Copy link
Author

AntonioRossi commented Oct 30, 2016

I would like to distinguish if a user is authorized by Google or if otherwise he is authorized by Facebook, and even more importantly if he is anonymously authenticated.

@EddyVerbruggen
Copy link
Owner

You can already determine that I think - it's the logintype you're passing in. If the user is consequently logged on you can store the last logintype with the user.

@AntonioRossi
Copy link
Author

I think your suggestion works, but also I think it could be preferable to have this information using directly firebase as the source.

Consider for example those cases in which a user has multiple login providers that have been linked to a single firebase user account.
I could have a web app using the javascript sdk that permits to manage this scenario and link multiple providers into a single firebase account, at this point it would be useful gather this information in the mobile apps without the trouble of managing the coherence and keep the syncing of these information.

@EddyVerbruggen
Copy link
Owner

See the updated readme

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants