Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Remove manual 2hr signout
Browse files Browse the repository at this point in the history
  • Loading branch information
itsravenous committed Sep 8, 2016
1 parent 3baad3b commit c63179c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions app/modules/auth/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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');
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c63179c

Please sign in to comment.