freescout
freescout copied to clipboard
Unable to customize the cookie session. Unable to terminate all active sessions.
PHP version: 8.3 FreeScout version: 1.8.120 Database: MySQL Are you using CloudFlare: No, I'm not using the proxy
Laravel usually store the sessions on storage/framework/sessions I tried to delete all file inside that folder but still be logged in, this is strange and should not happen.
How to terminate all active log in sessions? I have another Laravel app and cleaning files in that folder works but in FreeScout I'm unable to terminate all session, also the current one I'm logged in.
I know that session can be set in the .env file adding the line:
SESSION_LIFETIME=120
For example, session 120 min.
and also in the file config/session.php where I see the default settings are
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => env('SESSION_LIFETIME', 120),
Using the developer console, I see the cookie seems to be refreshed continuously.
I want set the session expire after 120 minutes.
I suppose to be able to do this by adding in the .evn file the line
SESSION_LIFETIME=120
and run php artisan freescout:clear-cache but this seems is not working, session never expire.
I expect also to be able to terminate all active session by deleting the content of storage/framework/sessions but also if I do this, I'm still logged in.
Could you check and let me know where I'm wrong? Maybe I'm using the remember me check box when login. How can customize also the max remind me lifetime? I see the cookie for the remember me set a very long time: years. How to customize that? Thanks.
I found that if the remember me option was checked on the login, the operator will be not disconnected even if files in sessions are removed.
For disconnect the operator need remove from the database, user table the remember me token then clear sessions folder.
There is a way to customize the remind me max time?
I tried to add
'remember' => 1440 // Set remember me duration here in minutes
in the auth.php
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
'remember' => 1440 // Set remember me duration here in minutes
],
Cleared cache and checked and a cookie remember me that will expire in 2029 still be created. Maybe your Laravel version used doesn't support the row I added?
Any solution?
We don't know. Try to find it out.