Each time I press the login button, a strange behavior occurs:
First login: callback indicates 2 logins
First logout
Second login: callback reports 4 logins
Second logout
Third login: callback now shows 5 consecutive logins
and so on.
This is the code for my login function:
$scope.userLogin = function(user){
$scope.userLoginEmail = user.email;
$scope.userLoginPassword = user.password;
$scope.authUser().login('password', {
email: $scope.userLoginEmail,
password: $scope.userLoginPassword
});
$scope.loginModalHide();
user.email = '';
user.password = '';
};
I'm puzzled by this issue. Why does it happen? Sometimes, even after clicking logout, the login function is triggered automatically.