Firebase注销权限错误

时间:2015-06-19 09:59:24

标签: angularjs firebase firebasesimplelogin

当尝试使用unauth()注销firebase时,我收到错误消息

错误:permission_denied:客户无权访问所需数据。

这是我的控制者:

 .controller('StatusController', [ '$scope', '$state', '$rootScope', '$firebase', '$firebaseObject', 'FIREBASE_URL', 'Authentication', function($scope , $state, $rootScope, $firebase, $firebaseObject, FIREBASE_URL, Authentication) {
      var ref = new Firebase(FIREBASE_URL);  
      $scope.logout = function(){
           $state.go('login');
           Authentication.logout();
      };

 }])

 .factory('Authentication' , ['$firebase' , 'FIREBASE_URL', '$q' , function( $firebase , FIREBASE_URL, $q, $scope){

    // other code above here
    var ref = new Firebase(FIREBASE_URL);

    logout: function(){
        // $scope.destroy();
            window.localStorage.removeItem("firebase:session::outfitpictest");
             return ref.unauth();
         } //logout
     } // object

     return myObject; 
 }]);

0 个答案:

没有答案