diff --git a/app/portainer/__module.js b/app/portainer/__module.js index 0e3aac20e..f13ac6d88 100644 --- a/app/portainer/__module.js +++ b/app/portainer/__module.js @@ -35,6 +35,7 @@ angular.module('portainer.app', ['portainer.oauth']).config([ await StateManager.initialize(); if (!loggedIn) { $state.go('portainer.auth'); + return Promise.reject('Unauthenticated'); } } catch (err) { Notifications.error('Failure', err, 'Unable to retrieve application settings'); diff --git a/app/portainer/services/authentication.js b/app/portainer/services/authentication.js index ed43666f6..c7e2af29a 100644 --- a/app/portainer/services/authentication.js +++ b/app/portainer/services/authentication.js @@ -31,7 +31,7 @@ angular.module('portainer.app').factory('Authentication', [ } return !!jwt; } catch (error) { - throw error; + return false; } }