I am running into a problem when my Laravel session-cookie changes expiry time each time I refresh and often expires after 2x refreshes.
I think the expected functionality is for it to expire x minutes after you last interacted with the service, but mine seems to work very differently. Let me detail it:
In my Laravel .env
file I have
APP_TIMEZONE="Pacific/Auckland"
Accessing PHP via the CLI I get this output with regards to my local time:
php -a
Interactive shell
php > echo date("Y-m-d H:i:s");
2018-12-30 04:08:09
php > echo date_default_timezone_get();
UTC
php > echo date('I');
0
The time given above is out by an hour. I think PHP is misconfigured for daylight savings. My cookie access times are also off by an hour as well, because of this I assume.
Login (Success)
Mon, 31 Dec 2018 03:53:21 GMT
Sun, 30 Dec 2018 03:53:21 GMT
Refresh #1 (Success)
Sun, 30 Dec 2018 05:53:31 GMT
Sun, 30 Dec 05:53:31 GMT
Refresh #2 (Logged Out)
Sun, 30 Dec 2018 05:53:39 GMT
Sun, 30 Dec 2018 05:53:39 GMT
Here's a video of it occuring: https://youtu.be/ssPAn5aE0ME
I would have expected that my Expires on value would have been bumped forward to 24 hours ahead of when I last accessed the application (that is what my session timeout is set to).
Any help would be appreciated!
I resolved this through double and triple checking my timezone settings in my .env file and my PHP ini files.