I published the original question in stackoverflow without any suitable answer:
https://stackoverflow.com/questions/73202167/laravel-redirect-to-login-page-after-session-timeout
so here it goes:
I have a Laravel App (5.8) where there's a session timeout after a while due to inactivity. But the page remains there until the user maybe tries to click on something and then it goes to the login page.
Now is it a good idea to invoke meta redirection to solve the issue?
<meta http-equiv="refresh" content="{{ config('session.lifetime') * 60 }}; url = {{ route('login') }}" />
What we're trying to achieve here is showing the login page (redirecting there automatically) after the timeout, but i'm trying to figure out how to do it, is this an okay method where the user can actually open multiple tabs on different times? or is there a better full proof way to do it.
Now after discussion, it seems meta is a bad idea in case user open multiple tabs in different times, so i'm still looking for an acceptable solution to that, thanks!