Why don't you just get in the habit of always closing your browser if you leave the computer. Logging into laravel does not take that long.
Laracasts forum does not handle CSRF token expiry gracefully; login fails silently
Suppose that I'm visiting the laracasts.com website and I leave it open after reading an article. The next day, I come back to the computer and decide I'd like to login and participate in the thread I'm viewing.
When I click Login, and enter my credentials, the login form submission fails silently, with no visual feedback to the user whatsoever.
I had to open the browser's DevTools console to see that the underlying cause is an expired CSRF token.
I find this puzzling, especially on an otherwise well-built website, presumably built and maintained by Laravel experts. :)
For what it's worth, I would avoid using something like https://github.com/GeneaLabs/laravel-caffeine because it will keep a tremendous number of sessions alive for no good reason.
While it may be tempting to say "Your token has expired, please refresh the page", it would be a lot more elegant to modify the JS that processes the authentication response such that if the token is expired, a new one is requested and used in a subsequent request that is sent automatically, and completely transparently where the user is concerned.
This has been a problem for quite some time (maybe since launch); it would be nice to see it fixed.
Please or to participate in this conversation.