i am using meteor for server side and ionic for client side
for connect ionic with meteor using following js
meteor-client-side, accounts-base-client-side, accounts-password-client-side
Step to reproduce auto logout issues
Step 1 : open www.xxx.com in Tab 1 and login user can see feed
Step 2 : open another Tab 2 xxx.xxx.com directly see feed screen
Step 3 : Logout Tab 2 user
Step 4 : Tab 2 try to login In this case Login done but after some second user auto logout
for login using following code
$meteor.loginWithPassword($scope.credentials.username, $scope.credentials.password)
.then(function() {
console.log('Login success ');
//alert("logged in: " + $scope.credentials.username);
$state.go(‘home’);
}, function(_error) {
console.log('Login error - ', _error);
alert("Error: " + _error.reason);
});
for logout using following code
$meteor.logout().then(function(_response) {
$state.go(‘login’);
});