diff --git a/awx/ui/client/src/login/authenticationServices/authentication.service.js b/awx/ui/client/src/login/authenticationServices/authentication.service.js index 463cf9679e..37426620a3 100644 --- a/awx/ui/client/src/login/authenticationServices/authentication.service.js +++ b/awx/ui/client/src/login/authenticationServices/authentication.service.js @@ -94,8 +94,7 @@ export default $rootScope.token_expires = null; $rootScope.login_username = null; $rootScope.login_password = null; - clearTimeout($rootScope.idleTimer); - clearTimeout($rootScope.endTimer); + $rootScope.sessionTimer.expireSession(); }, getLicense: function () { diff --git a/awx/ui/client/src/rest/interceptors.service.js b/awx/ui/client/src/rest/interceptors.service.js index 3846345227..1a5d4f13a5 100644 --- a/awx/ui/client/src/rest/interceptors.service.js +++ b/awx/ui/client/src/rest/interceptors.service.js @@ -21,7 +21,7 @@ return config; }, responseError: function(rejection){ - if(rejection.data.detail && rejection.data.detail === "Maximum per-user sessions reached"){ + if( !_.isEmpty(rejection.data.detail) && rejection.data.detail === "Maximum per-user sessions reached"){ $rootScope.sessionTimer.expireSession('session_limit'); return rejection; }