angularjs - Firebase logout permission error -
when trying logout out of firebase unauth() error saying
error: permission_denied: client doesn't have permission access desired data.
this controller:
.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; }]);
Comments
Post a Comment