标签: firebase firebase-realtime-database firebase-authentication
我希望能够从3个Google域中访问我的数据库。我可以从一个域访问它,但当我尝试添加更多它失败。
到目前为止我尝试过的规则:
{ "rules": { ".read": "auth.token.email.endswith('mycompany@gmail.com')" } }
我曾尝试在其中添加或声明,但在第二个域名中我未获得授权。
答案 0 :(得分:0)
请尝试使用此语法:
"auth.token.email.matches(/.*@gmail.com$/)"
您也可以将逻辑运算符放在里面 - &&,||。
&&
||
更多here和显然 here。