Firebase模拟读取被拒绝 [英] Firebase simulate read denied
本文介绍了Firebase模拟读取被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的firebase项目中,我已经实现了Google身份验证.
In my firebase project, I have implemented Google Authentication.
我的firebase规则如下所示:
My firebase rules looks like the following:
{
"rules": {
"users": {
"$uid": {
".read": "auth.uid == $uid",
".write": "auth.uid == $uid"
}
}
}
}
数据库具有以下快照:
The database has the following snapshot:
每次我尝试模拟. Firebase说模拟读取被拒绝".
Everytime I try to simulate. Firebase says that the "Simulate read denied".
我在这里做错任何想法吗?
Any ideas that I am doing wrong here?
推荐答案
我意识到了这个问题.我正在访问"/users",但是应该访问"/users/$ uid"来模拟规则.
I realised the problem. I was accessing "/users" but instead, I should be accessing "/users/$uid" to simulate rule.
这篇关于Firebase模拟读取被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文