Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase how to get user details?

I am using Firebase authentication in my app and signing up a user with email and password. I want to get other users details (separate from the logged-in user) as well while a user is signed in with their own account. How can I get that information?

like image 378
Faris Jameel Avatar asked Aug 09 '16 12:08

Faris Jameel


1 Answers

Values like email, display name and id (specific to authentication system) are available off of the Firebase User object. You can get a reference to the current logged in user off of the FIRAuth class. I provided links and class names for iOS, but other platforms are similarly structured.

If you want to store additional data for users, I would recommend including a users root node, using the uid off of the Firebase User object as the key for users child nodes.

like image 190
Harel Avatar answered Oct 26 '22 11:10

Harel