英文:
How do I implement Admin SDK in my flutter so that I should Manage the users from Admin Panel?
问题
我是新手,正在进行我的毕业项目,使用Flutter。我想在我的应用程序中实现管理员功能。到目前为止,我已经实现了数据流和身份验证部分,但我在实现用于从身份验证表中删除用户的管理员SDK方面遇到了困难,以便管理员具有完全的权限。
是否有其他可能的替代方法?还是我必须实现管理员SDK来完成这个任务。请指导一下?如果是的话,应该如何操作?
英文:
I'm new to flutter working on my Final Year Project. I want to implement Admin functionalities in my App. So far I had implemented the data flow and the authentication things but I am stuck at implementing the Admin SDK for the removal of users from the auth table so that the admin has the complete priviligies.
Is there any alternate way possible? Or I have to implement the Admin SDK for this. Kindly guide? And if yes how should I do so?
答案1
得分: 0
Firebase Admin SDK是设计用于受信任环境的,比如您的开发机器、您控制的服务器或云函数/Cloud Run。它们明确不应用于客户端应用程序,比如您的Flutter应用程序。
如果您想创建一个Flutter应用程序,用于管理用户,您可以:
- 创建自己的API端点(例如,使用Cloud Functions或Cloud Run),在其中使用Admin SDK来实现必要的用例。
- 保护这些端点,以便只有授权用户可以调用它们。
- 然后从您的Flutter应用程序代码内部调用API端点。
另请参阅:
- https://stackoverflow.com/questions/54290458/how-to-use-firebase-admin-sdk-in-flutter
- https://stackoverflow.com/questions/69939723/is-it-possible-to-use-firebase-admin-sdk-in-flutter-web-apps
- https://stackoverflow.com/questions/63548004/flutter-understanding-firebase-admin-and-how-to-get-a-users-information-from
英文:
The Firebase Admin SDKs are designed to be used in a trusted environment, such as your development machine, a server that you control, or Cloud Functions/Cloud Run. They are explicitly not to be used in client-side applications, like your Flutter app.
If you want to create a Flutter app that can be used to manage users, you'll want to:
- Create your own API end points (e.g. with Cloud Functions or Cloud Run) where you use the Admin SDK to implement the necessary use-cases.
- Secure those end points so that only authorized users can call them,
- Then call the API end points from within your Flutter application code.
Also see:
- https://stackoverflow.com/questions/54290458/how-to-use-firebase-admin-sdk-in-flutter
- https://stackoverflow.com/questions/69939723/is-it-possible-to-use-firebase-admin-sdk-in-flutter-web-apps
- https://stackoverflow.com/questions/63548004/flutter-understanding-firebase-admin-and-how-to-get-a-users-information-from
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论