gpt4 book ai didi

Firebase 实时数据库规则 "Unknown variable ' 请求'。”

转载 作者:行者123 更新时间:2023-12-03 15:11:48 25 4
gpt4 key购买 nike

enter image description here
有谁知道为什么我不能从这里使用这个片段 https://firebase.google.com/docs/rules/basics#realtime-database_2

最佳答案

看起来像是文档错误,因为在 Firestore 中你会写 request.auth.uid而在 RTDB 中,您只需写 auth.uid .

{
"rules": {
"some_path": {
"$uid": {
// Allow only authenticated content owners access to their data
".read": "auth != null && auth.uid == $uid",
".write": "auth != null && auth.uid == $uid"
}
}
}
}

关于Firebase 实时数据库规则 "Unknown variable ' 请求'。”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63742141/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com