Auth0 Home Blog Docs

Sessions expiring too quickly


#1

I’m adapting the sample PHP app to my first project, but I’m finding that users are required to login approximately every hour. Seems like the session or authentication is expiring very quickly.
I’ve tried finding expiration settings, but the only one I can find that seems semi relevant is JWT token expression time under advanced client settings… and this is already set to 10 hours. Not having much joy finding a solution on Google or in this forum.
Where should I be looking to adjust this to more than an hour?


Sessions expiring too quickly
#4

:wave: @miking I believe this is being caused by a cookie setting specific to PHP or your web server, and it’s not related to the expiration time of the JWT. Can you check in php.ini for a PHP session cookie lifetime setting or a similar setting that it not being overriden?


#5

Thanks @kim.noel - that was the issue. (default session.gc_maxlifetime = 1440 in php.ini was destroying sessions after 24 minutes)


#6

Great! Glad we found the issue :slight_smile: let us know if you need any further help.