1

I have integrated Firebase's Facebook and Email Login into my iOS application.

Although, I would like to only store the Firebase User ID in my API database.

Therefore from my backend server (say Ruby) how can I query firebase to get say the user's name and user's email address given that I have their Firebase User UID.

Thanks

Prakash Raman
  • 13,319
  • 27
  • 82
  • 132

1 Answers1

2

To directly read user data for arbitrary users of your app, you'd use the Firebase Admin SDK: https://firebase.google.com/docs/admin/setup. This specific page shows how to read user data: https://firebase.google.com/docs/auth/admin/manage-users#retrieve_user_data

Reading user data through the Admin SDK is currently only available for Node.js and Java. Since Ruby isn't on this list, you'll need to keep the user information elsewhere. The Firebase Database is a common place to store such data, so that any platform can access it through its REST API.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Ah thanks. Yes, looks like I would want the admin API. Is there a basic REST API too? I am thinking I can write my own Ruby wrapper to it. – Prakash Raman Jul 10 '17 at 14:27