I am using laravel default Auth. When I enter my site everything works fine. When I try to refresh or go to another page (still using Auth middleware), my session has expired, I immediately logged off and I have to log in again. How can I fix this, so I stay on when I refresh the page or view another?
It is worth changing (app / session.php):
'cookie' => 'laravel_session'
Something related to your application / website as it is reset every time the cache compiles
sesssion :
config/session.php
'driver' => env('SESSION_DRIVER', 'file')
, "//":
'files' => storage_path('framework/sessions')
You can also set a higher lifetime in config / session.php
/* |-------------------------------------------------------------------------- | Session Lifetime |-------------------------------------------------------------------------- | | Here you may specify the number of minutes that you wish the session | to be allowed to remain idle before it expires. If you want them | to immediately expire on the browser closing, set that option. | */ 'lifetime' => 120, 'expire_on_close' => false,
Please note that with expire_on_clone, if you set it to true, the session expires when the browser is closed.
Source: https://habr.com/ru/post/1607425/More articles:How to convert a column to rows in pandas? - pandasWhat happens if RDD cannot fit into Spark's memory? - scalaCoroutine and native coroutine generator - pythonSwift 2: protocol extension UITableViewDataSource - iosUsing object properties that are not specified in Object Browser - objectHow to use an optional attribute for alleged form arrays - fortranRetrieving artifacts created by a remote trigger - jenkinsDoes postEvent receive an event after posting? (double freedom or corruption) - c ++Table divider looks like a triangle - iosКак связать (для браузера) typescript внешние модули, сгенерировать d.ts и использовать в клиентском приложении? - javascriptAll Articles