Firebase real-time database (Get other user info based on UID) with REST

前端 未结 1 663
一生所求
一生所求 2021-01-29 03:59

I have an app created with Firebase real-time database and I\'ve created a few users, all with REST methods found here: https://firebase.google.com/docs/reference/rest/auth/

相关标签:
1条回答
  • 2021-01-29 05:01

    There is no public REST API to get a list of all users. The reason for this is that getting a list of users is considered a sensitive operation, and allowing that from client-side code would be risky.

    The common way to implement your use-case is to build your own endpoint, either on a server you already control, or with Cloud Functions. There you can use the Admin SDK to get the list of users, and then return that to your caller. Make sure to limit what data you return and to properly secure that endpoint though, as otherwise you'll be putting your user's information at risk.

    0 讨论(0)
提交回复
热议问题