How to get access to the firebase Authentication part

让人想犯罪 __ 提交于 2021-02-02 08:18:17

问题


In my app I've 2 login methods(google&facebook) and all the users appear in the Authentication part inside my firebase project, and I haven't list/collection of my users in my database.

I want to display in my app list of users with some personal data.

My question is how do i get access to the users from the Authentication part(to get all the users for example)?

Is it good approach that the users appear only in the Authentication and not inside my database?


回答1:


You can't list user accounts with the Firebase Authentication client SDK. You can only do that with the Firebase Admin SDK on a backend you control.

If you think it's OK for your users to be able to know all other users, then you should store that information in your database to make it queryable directly from the client, or create some sort of API endpoint where you can invoke the Admin SDK from your app.



来源:https://stackoverflow.com/questions/56566791/how-to-get-access-to-the-firebase-authentication-part

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