Best practice Fetch user's information from the Firebase User UID

 ̄綄美尐妖づ 提交于 2019-12-25 08:53:31

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/45012765/best-practice-fetch-users-information-from-the-firebase-user-uid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!