php - Laravel 5.1 & remember me functionality -
my laravel 5.1 app keeps users logged in. set variables in session.php this:
'lifetime' => 1, 'expire_on_close' => true,
i spent lot of time googling , didn't find solution. doesn't matter if pass "true", "false", or nothing @ "remember" parameter auth::attempt(). user stay logged in after 1 minute, or after close browser. remember_token gets written db after log out manually, seems weird me.
doesn't seem browser-specific problem checked in both firefox , chromium. in advance help!
edit: need session expire when close browser. set lifetime 1 minute see if @ least that's gonna work , didn't.
if expire_on_close set true, laravel ignore lifetime.
'lifetime' => 1, 'expire_on_close' => true,
and in case, session valid after 1 min - expire after closing browser. change to:
'lifetime' => 1, 'expire_on_close' => false,
and session expire after 1 min. no matter if browser closed or not - closed.
Comments
Post a Comment