When there is are invalid Auth.login credentials the failure function is never called. Only a 401 unauthorized access is returned. My code: Auth.login($scope.user).then(function(){ $state.go('home'); }, function(error){ // never called });
When there is are invalid Auth.login credentials the failure function is never called. Only a 401 unauthorized access is returned.
My code:
Auth.login($scope.user).then(function(){
$state.go('home');
}, function(error){
// never called
});