mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 16:29:44 +02:00
fix(auth): prevent redirect parameter to use state portainer.auth (#2701)
This commit is contained in:
parent
9c4c782a90
commit
da44f14e07
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ function initAuthentication(authManager, Authentication, $rootScope, $state) {
|
||||||
// authManager.redirectWhenUnauthenticated() + unauthenticatedRedirector
|
// authManager.redirectWhenUnauthenticated() + unauthenticatedRedirector
|
||||||
// to have more controls on which URL should trigger the unauthenticated state.
|
// to have more controls on which URL should trigger the unauthenticated state.
|
||||||
$rootScope.$on('unauthenticated', function (event, data) {
|
$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});
|
$state.go('portainer.auth', {error: 'Your session has expired', redirect: $state.current.name});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue