mirror of https://github.com/portainer/portainer
fix(auth): reject main route if logged out (#4197)
parent
9d18d47194
commit
b4c2e5d235
|
@ -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');
|
||||
|
|
|
@ -31,7 +31,7 @@ angular.module('portainer.app').factory('Authentication', [
|
|||
}
|
||||
return !!jwt;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue