0

Firebase stores a user's display name, profile picture and other relevant information in the User object and not on the relational database. how can I load the several user's display name and profile picture without authenticating them?

I'm creating a commenting module, where users can post text and view the user's name and image beside the text.

adjuremods
  • 2,938
  • 2
  • 12
  • 17
Nathan
  • 163
  • 10
  • There is no API to load information about multiple users in Firebase Authentication. Most developers keep a list of user information in their Firebase database for this reason. See http://stackoverflow.com/questions/14673708/how-do-i-return-a-list-of-users-if-i-use-the-firebase-simple-username-password and http://stackoverflow.com/questions/31038611/add-extra-details-on-firebase-user-table/31039334#31039334 – Frank van Puffelen Nov 01 '16 at 13:53

1 Answers1

0

Its not actually stored on the Firebase Database, but is dependent on the Firebase Authentication. Manage Users discusses this. FirebaseUser as an object, has displayName, email, and photoUrl. This may work well on the readily available providers (Facebook, Twitter, GitHub, etc.).

If this isn't the case, and you've implemented your own way handling this, it will depend on your structure. If your Users object has a photoUrl attribute, then just call it. The same can be said if you've approached this using Firebase Storage.

adjuremods
  • 2,938
  • 2
  • 12
  • 17