Disable SESSION_LIFETIME environment var which interferes with autolock

This commit is contained in:
Bubka 2022-10-19 13:12:49 +02:00
parent 1b8d4b78c5
commit 6dae877e68
4 changed files with 7 additions and 7 deletions

View File

@ -162,7 +162,6 @@ TRUSTED_PROXIES=null
BROADCAST_DRIVER=log
QUEUE_DRIVER=sync
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null

View File

@ -31,7 +31,6 @@ BROADCAST_DRIVER=log
CACHE_DRIVER=array
QUEUE_CONNECTION=sync
SESSION_DRIVER=array
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null

View File

@ -31,7 +31,7 @@
|
*/
'lifetime' => env('SESSION_LIFETIME', 120),
'lifetime' => 1 * (60 * 24 * 90),
'expire_on_close' => false,

10
resources/js/api.js vendored
View File

@ -20,11 +20,10 @@ Vue.axios.interceptors.response.use(response => response, error => {
return Promise.reject(error);
}
// Otherwise we push to a specific or generic error view
let routeName = 'genericError'
// Push to the login view and force the page to refresh to get a fresh CSRF token
if ( error.response.status === 401 ) {
routeName = 'login'
router.push({ name: 'login', params: { forceRefresh: true } })
throw new Vue.axios.Cancel();
}
if ( error.response.status === 407 ) {
@ -32,6 +31,9 @@ Vue.axios.interceptors.response.use(response => response, error => {
throw new Vue.axios.Cancel();
}
// we push to a specific or generic error view
let routeName = 'genericError'
// api calls are stateless so when user inactivity is detected
// by the backend middleware it cannot logout the user directly
// so it returns a 418 response.