Sam321pbs
Sam321pbs

Reputation: 301

Am I able to load another users profile image in firebase android?

Am I able to load another users profile image if I have their email but I'm logged in as another user?

Upvotes: 4

Views: 1569

Answers (2)

Chris Ricca
Chris Ricca

Reputation: 61

No, you are only able to get the information for the currently logged in user using the Firebase Auth library. (I'm assuming that's what you're asking because the documentation doesn't say this explicitly, so it is very confusing.)

To support accessing the user profile image for another user, you should store the image using something else like Firebase Database or Firebase Storage, and then query those when you're logged in as another user.

Here's a related Stack Overflow thread:

Firebase how to get user details?

Upvotes: 1

CodeChimp
CodeChimp

Reputation: 4835

If you are using Firebase Storage then technically yes, it's just a file system that you can retrieve any file from. Users won't have access to this without forging your app/obtaining the api key.

It's your app that is in control of retrieving the correct image for a user, Firebase Storage doesn't have the concept of security other than your app signing key being associated with the FireBase project/your app having the API key to use that particular FireBase project's storage.

Upvotes: 1

Related Questions