0

We've set up this

'expire_on_close' => true,

in config/session.php

However we are still not able to get our users to logout when they close their browser.

Anything else we can try?

Chirag
  • 1,919
  • 6
  • 25
  • 33
  • You should not rely on expire on close. Only thing You can be sure that You're controlling is session data saved in storage that You have access. Simple solution is to save session in database and clean outdated sessions. – num8er Oct 27 '19 at 23:25
  • browser is not safe place and it's been proved in: https://stackoverflow.com/questions/10617954/chrome-doesnt-delete-session-cookies which tells that chrome works differently. – num8er Oct 27 '19 at 23:30

2 Answers2

2

config/session.php :: expire_on_close should work just fine, except in the case you used "Remember me" functionality.

Benjamin Beganović
  • 1,070
  • 1
  • 8
  • 12
0

After making the change try:

php artisan config:cache
php artisan config:clear
Prathamesh Doke
  • 797
  • 2
  • 16
  • 38