title: Laravel TokenMismatchException session timeout
body: <p>I am running into an issue where when a user sits idle for more than 24 hours (my session timeout), or leaves the site and then comes back after 24 hours, they are not being logged out of the site, but their session is being expired, or at least their _token is no longer valid.</p>
  
  <p>This causes unwanted behavior as if the user submits a form after their _token has expired and they now receive a <code>TokenMismatchException</code>. </p>
  
  <p>Locally it seems that when the idle time exceeds the session lifetime the user is logged out, however in production on the live server this is not the case, the idle time can surpass the session lifetime and yet the user is still logged in and <code>Auth::check()</code> and <code>Auth::user()</code> both function as expected if a user were logged in.</p>
  
  <p>What would cause the user to not be logged out, even though their session has expired?</p>
  
  <p>Is there a way I can check that the session has expired so that I can then manually log the user out with a message asking them to log back in?</p>
  
  <p>I have tried to use the <code>App::before</code> filter to check the last_activity on the session and determine if it has expired, but once the session has expired I no longer have access to it as it has been removed from the database, therefore I can not compare the timestamps to determine if the user needs to be manually logged out and prompted to re login. </p>
  
  <p>My session config: </p>
  
  <pre><code>'driver' =&gt; 'database',
  
  'lifetime' =&gt; 1440,
  
  'expire_on_close' =&gt; false,
  </code></pre>
  
  <p>Thanks.</p>