forked from Alex/Pterodactyl-Panel
Actually fix the endless redirect loop when the application needs a fresh JWT.
This commit is contained in:
parent
5c3d3f6ce9
commit
81da55d46b
@ -28,7 +28,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'lifetime' => env('SESSION_LIFETIME', 10080),
|
||||
'lifetime' => env('SESSION_LIFETIME', 720),
|
||||
|
||||
'expire_on_close' => false,
|
||||
|
||||
|
@ -60,7 +60,8 @@ router.beforeEach((to, from, next) => {
|
||||
// client side without having to wait for older tokens to pass their expiration time if
|
||||
// we lower it.
|
||||
if (user === null || compareDate(addHours(dateParse(user.getJWT().iat * 1000), 12), new Date()) < 0) {
|
||||
return window.location = route('auth.login');
|
||||
store.commit('auth/logout');
|
||||
return window.location = route('auth.logout');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user