[英]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.