如何使用Node JS为我的firebase数据库实施安全规则 我尝试了各种选择......
我写了如下规则
{
"rules": {
"data":{
".read": "auth.uid == 'my auth.uid'",
".write": "auth.uid == 'my auth.uid'"
}
}
}
并在我的Nodejs代码中:
var FirebaseTokenGenerator = require("firebase-token-generator");
var tokenGenerator = new FirebaseTokenGenerator("my firebase Secrete key");
var auth = tokenGenerator.createToken(
{ "provider": "anonymous", "uid": "my auth.uid" },
{admin: true}
);
请帮助我,我是新人..