简体   繁体   English

如何在 flutter 应用程序中的 firebase 控制台中获取身份验证计数?

[英]How to get the count of authentications in firebase console in the flutter app?

How to get the count of Authentications in firebase console by using flutter for example: 1000 users are authenticated to my app .例如,如何使用flutter获取firebase 控制台中的身份验证计数1000 个用户已通过我的应用程序的身份验证 i can see the users who are authenticated to my application through firebase console .But I need to get the count of authentications (1000) in my flutter admin applications .我可以看到通过firebase 控制台对我的应用程序进行身份验证的用户。但是我需要在我的flutter 管理应用程序中获取身份验证计数(1000)。

Now i'm getting the authentication count with the help of cloud firestore by simply create the collection and inside the document i'm incrementing the count of integer whenever the new user sign in.现在,我通过简单地创建集合并在文档内部通过云 Firestore 获得身份验证计数,每当新用户登录时,我都会增加 integer 的计数。

Is there any way to do it without the help of cloud firestore.Kindly help me to solve this issue.有没有办法在没有云火库的帮助下做到这一点。请帮我解决这个问题。 Thanks in advance..提前致谢..

As Dharmaraj commented, you get get a list of all users from the Firebase Admin SDK.正如 Dharmaraj 评论的那样,您会从 Firebase Admin SDK 获得所有用户的列表 This SDK cannot be used directly in your Flutter app though, and is meant to be used only in trusted environments.但是,此 SDK 不能直接在您的 Flutter 应用程序中使用,并且只能在受信任的环境中使用。 I also don't think it's the best fit for your use-case, as listing all users is going to slow down as you add more users to your app.我也不认为它最适合您的用例,因为随着您向应用添加更多用户,列出所有用户的速度会变慢。

Keeping a count of what you want to show in the database (as you already seem to be doing) is probably the right approach here, as it amortizes the cost of maintaining the counter over the user actions, makes the reads trivial, and allows you to track exactly the count of actions that fits with your use-case.记录您想在数据库中显示的内容(正如您似乎已经在做的那样)可能是这里的正确方法,因为它可以将维护计数器的成本摊销到用户操作上,使读取变得微不足道,并允许您准确跟踪适合您的用例的操作计数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从firebase获取图片和视频并显示在flutter app中? - How to get images and videos from firebase and show in flutter app? 如何使用 Firebase Flutter 计算列表中的字符串 - How to count string in an List with Firebase Flutter Flutter - 如何在 flutter 应用程序上实施新闻计数 - Flutter - How to implement News Count on a flutter app 如何在不使用 Firebase 控制台的情况下使用 FCM 在 Flutter 应用程序中触发推送通知? - How to trigger push notifications in Flutter app using FCM without using the Firebase Console? 如何为flutter上的应用更改Firebase项目 - How change the Firebase project for an app on flutter 如何在 flutter 中获取仅在 firebase 中的联系人 - How to get the contacts which is only in firebase in flutter Flutter App如何在Firebase中集成身份验证和数据库? - How to integrate authentication and database in Firebase for Flutter App? Firebase:如何在应用检查中注册我的 Flutter 应用? - Firebase: How do I register my Flutter app in app check? 如何从flutter中获取firebase的数据 - how to get data from firebase in flutter Flutter:如何获取 Apple 凭据以将 Apple 帐户链接到我的 firebase 应用程序上的帐户? - Flutter: how do I get Apple credential to link an apple account to an account on my firebase app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM