I am trying to upgrade our site from 4.0 to 4.1 per the Laravel docs. The site worked fine prior to the upgrade. I made all the changes per the 4.0 to 4.1 upgrade documentation.
What is happening is that AFTER the user logs in and is redirected to the home page the $this -> beforeFilter( 'auth' ); kicks the user back to the login page. We do use our own custom authentication method but I have stepped through the code and it authenticates and returns the user model to laravel. The authentication controller then does a return Redirect::intended( '/home' );. Also, our session data is written to the database (database driver).
Am I missing something?
Ok, so I am monitoring the sessions table and Laravel keeps adding NEW sessions every time I log in or am redirected. Why isn't Laravel using the previous session that was set? I see cookies being set on my browser (Google Chrome).
Look in /app/config/session.php under session lifetime.
If it is set to zero (0) change it to 120 or something.
// 'lifetime' =>0,
// change to this
'lifetime' => 120,
Lifetime set to zero has different behaviour in 4.1 and causes the session to be recreated.
Thank you sitesense! That fixed it! Wouldn't have guessed that!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community