mirror of https://github.com/portainer/portainer
fix(auth): prevent redirect parameter to use state portainer.auth (#2701)
parent
9c4c782a90
commit
da44f14e07
|
@ -44,7 +44,7 @@ function initAuthentication(authManager, Authentication, $rootScope, $state) {
|
|||
// authManager.redirectWhenUnauthenticated() + unauthenticatedRedirector
|
||||
// to have more controls on which URL should trigger the unauthenticated state.
|
||||
$rootScope.$on('unauthenticated', function (event, data) {
|
||||
if (!_.includes(data.config.url, '/v2/')) {
|
||||
if (!_.includes(data.config.url, '/v2/') && ($state.current.name !== 'portainer.auth')) {
|
||||
$state.go('portainer.auth', {error: 'Your session has expired', redirect: $state.current.name});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue