Alexander Nikolov
Alexander Nikolov

Reputation: 1979

Laravel 4 - remember me not working?

I have implemented remember me functionality in my Laravel 4.2 project.

Here is how I login passing remember me checkbox value:

Auth::login($user, $remember);

In session.php I have 1 minute expiration for testing purposes:

'lifetime' => 1,

'expire_on_close' => false,

Now, when I login cookes are created, one for the session with expiration 1 min and one for the remember_me with expiration 5 years.

After 1 minute the session cookie is expired and I am redirected to the login screen which is not what I would expect since remember_me was checked.

What am I missing here ?

Upvotes: 0

Views: 119

Answers (1)

Alex
Alex

Reputation: 85

As I understand in a minute session gone, maybe try to remember the user as it is written here, or bring the code exactly how you store session for more specific recommendations

P.S. Is there a remember_token field in the table users?

Upvotes: 1

Related Questions