1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 13:25:26 +02:00

feat(auth): preserve url when redirected to login (#2591)

* feat(auth): preserve url when redirected to login

* feat(auth): add redirect also to unauthenticated flow

* style(app): remove style changes from files

* fix(app): remove reference to otpLogin

* style(auth): remove semicolon
This commit is contained in:
Chaim Lev-Ari 2019-01-23 01:22:56 +02:00 committed by Anthony Lapenna
parent 8160fe4717
commit f772cd31cb
3 changed files with 9 additions and 9 deletions

View file

@ -45,7 +45,7 @@ function initAuthentication(authManager, Authentication, $rootScope, $state) {
// to have more controls on which URL should trigger the unauthenticated state.
$rootScope.$on('unauthenticated', function (event, data) {
if (!_.includes(data.config.url, '/v2/')) {
$state.go('portainer.auth', {error: 'Your session has expired'});
$state.go('portainer.auth', {error: 'Your session has expired', redirect: $state.current.name});
}
});
}