Session timeout


Consider the following scenario:
A Javascript/React application runs in a user’s dashboard. The app, allows the authenticated user to edit/update the database data,via an AJAX API.
Sometimes, the session times out, and the user only discovers too late, when the desired API action fails with an error.

We want to accomplish one, or more of the following:

  1. Have control of the session timeout value for UF. (I suppose this is set in php.ini?)
  2. Display a countdown timer to the user, for the session to expire. This value must be provided by UF (which means that UF/PHP must dynamically discover the session timeout value each time)
  3. Allow the user to reset the timeout counter, by an AJAX call, without leaving the page or lose the content they are currently editing. (is this possible? do sessions reset as with API calls?)

Any thoughts on the above? Thanks

#2 would be weird user experience…

An Ajax call in the background pining the PHP backend at regular interval would probably be better. A “log back in” modal would probably work great.

Could also use this to make sure nobody messed with session. Consider this:

  1. load the page
  2. open new tab
  3. logout
  4. login to new account
  5. go back to first tab, hit save with original user data

(Agreed, this could happen to any UI :slight_smile: )

1 Like


I am getting complaints from users that the sessions timeout a lot sooner than desired.
I need to get this sorted.

To begin… How can I increase the session timeout value? Is this the one set in php.ini ?