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

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.