【发布时间】:2018-05-20 09:53:16
【问题描述】:
我目前正在开发一个应用程序,并且我在 Google Play 中有相关测试人员的 alpha 版本,它仅在瑞典可用。
我使用Firebase 为每个用户在服务器上存储数据,我还使用Firebase 登录。
根据我的 FireBase 控制台中的authorization 和database,我是唯一一个测试过它的人。但是,在分析中,它说United States 中有活动!这怎么可能?与 Firebase 的服务器有关吗?
我想到了我的数据库的规则,我有以下几点:
{
"rules": {
// Give any logged in user admission to "users" so that they can create a new entrance for themselves
".write": "auth != null",
".read": "auth != null",
"users": {
"$user_id": {
// Grants write access to the owner of this user account
// whose uid must exactly match the key ($user_id)
".write": "$user_id === auth.uid && auth != null",
".read": "$user_id === auth.uid && auth != null"
}
}
}
}
有什么遗漏吗? 目的是只有登录的用户才能写入数据库并且只能写入他们的特定文件夹。
我也有我昨天测试过的inAppSubscription,也许这会触发一些使它看起来像出现在US 中的东西?
【问题讨论】:
标签: firebase firebase-realtime-database firebase-authentication firebase-analytics