Security- Login

Fixed login modal issue where logging out and immediately clicking Sign In button without entering username/password would log back in as prior user.
This commit is contained in:
Chris Houseknecht
2014-08-13 09:21:14 -04:00
parent 1b7d94732b
commit 2e39e093af
4 changed files with 62 additions and 60 deletions

View File

@@ -59,13 +59,15 @@ angular.module('AuthService', ['ngCookies', 'Utilities'])
var scope = angular.element(document.getElementById('main-view')).scope();
scope.$destroy();
$rootScope.$destroy();
$cookieStore.remove('token');
$cookieStore.remove('token_expires');
$cookieStore.remove('current_user');
$cookieStore.remove('lastPath');
$cookieStore.remove('lastPath', '/home');
$cookieStore.remove('token');
$cookieStore.put('userLoggedIn', false);
$cookieStore.put('sessionExpired', false);
$cookieStore.remove('lastPath', '/home');
$cookieStore.put('token', '');
$cookieStore.put('current_user', {});
$rootScope.current_user = {};
$rootScope.license_tested = undefined;
$rootScope.userLoggedIn = false;
@@ -73,6 +75,8 @@ angular.module('AuthService', ['ngCookies', 'Utilities'])
$rootScope.token = null;
$rootScope.token_expires = null;
$rootScope.lastPath = '/home';
$rootScope.login_username = null;
$rootScope.login_password = null;
},
getLicense: function () {