statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

RFE: Set Cookies Timeout Expiration (etc.) via `.env` #584

Closed iDGS closed 8 years ago

iDGS commented 8 years ago

Request For Enhancement:

User/customer wants the login timeout to be a month. O-kaaaaay... At present (v2.0.0) I think it's set for half an hour (?) and the only place to change that cookie lifetime stuff is gasp inside the system itself! Per Rudy’s comment on Slack:

@idgs, in the statamic/config/session.php line 32, if you change it to

'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),

you can then access them from your .env

Me, I'm desperately allergic to that kind of solution, as I'd have to keep modifying the source code with every update.

MUUUUCH better if you gents do it, ja? And give us a spiffy example in the docs? :-)

Plus I've been told there's more stuff stuffed away in yon system that would likewise be nice to access via said .env method. (Pretty please?)

jasonvarga commented 8 years ago

Will be in 2.0.1