The session expiration feature allows setting an inactivity timeout and a max lifetime for sessions. When this feature is used, you should use
rodauth.check_session_expiration at the top (or other appropriate place) in your routing tree.
route do |r| rodauth.check_session_expiration r.rodauth # ... end
When checking session expiration, if the last activity was more than the inactivity timeout, or the session was created more the maximum lifetime ago, the session is cleared, and the user is redirected to the login page.
The maximum number of seconds since session creation that sessions will be valid for, regardless of session activity. 86400 by default (1 day).
The session key storing the session creation timestamp.
Whether to expire sessions that don't have the created at or last activity at timestamps set, true by default.
The flash error to show if a session expires.
The error status to use when a JSON request is made and the session has expired, 401 by default.
Where to redirect if a session expires.
The maximum number of seconds allowed since the last activity before the session will be considered invalid. 1800 by default (30 minutes).
The session key storing the last session activity timestamp.