From c63179cf1965e124be38736269d610e005ca0b51 Mon Sep 17 00:00:00 2001 From: Tom Jenkins Date: Thu, 8 Sep 2016 13:07:12 +0100 Subject: [PATCH] Remove manual 2hr signout --- app/modules/auth/scripts/init.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/modules/auth/scripts/init.js b/app/modules/auth/scripts/init.js index 0231bce..9f6c680 100644 --- a/app/modules/auth/scripts/init.js +++ b/app/modules/auth/scripts/init.js @@ -40,7 +40,6 @@ var auth = localStorageService.get('auth'); if (0 < (Math.floor(Date.now() / 1000) - auth.token_start) < auth.expires_in) { _setToken(auth.access_token); - _startTimer(); _setUserData(); } else { signOut(); @@ -55,7 +54,6 @@ expires_in: params.expires_in * 1000 }); _setToken(params.access_token); - _startTimer(); return _setUserData() .then(function () { $window.location.href = localStorageService.get('redirectOnSignIn'); @@ -102,18 +100,6 @@ $rootScope.$broadcast('auth:signout'); } - function _startTimer() { - var auth = localStorageService.get('auth'); - var expiry = auth.token_start + auth.expires_in - Date.now(); - $interval(function () { - signOut(); - $modal.open({ - templateUrl: 'templates/auth/session-expired.html', - controller: 'SessionExpiredModalController' - }); - }, expiry, 1); - } - return { signIn: signIn, signOut: signOut,