Firebase匿名身份验证问题

时间:2014-07-11 07:01:42

标签: javascript backbone.js firebase

我正在使用Firebase Simple Login(版本1.6.1)进行匿名身份验证。我开始,

var livepolling_ref = new Firebase(FIREBASE_URL);
var auth = new FirebaseSimpleLogin(livepolling_ref, function(error, user) {
    if (error) {
        console.log('An error!');
    } else if (user) {
        //Boot the App and save the user.id
        //I'm able to reach this point in the code using the debugger
    }
});

auth.login('anonymous');

我已经检查过用户在回调中有一个uid和一个FirebaseAuthToken,我保存了用户ID。所以我似乎已登录。

但是,我在整个Firebase仓库中都有以下安全保护。

".write": "auth != null"

当我查看Chrome控制台时,它会告诉我“权限被拒绝”。

1 个答案:

答案 0 :(得分:1)

我意识到自己的错误 - 我引用了错误的Firebase Repo。抱歉混乱!