Using logout_on_timeout with page auto-refresh
Does anyone know if there's a preferred method for supporting both of the following features?
-
automatic user logout for security reasons after, say, 15 minutes
-
Periodic page refresh every minute so the user can receive timely content updates.
I've tried both meta-refresh and javascript refresh. Each auto-refresh method causes the user's last_requested_at column to be updated. This update in turn prevents session timeout due to inactivity from working.
Ideally, there would be a way to issue a 'special' periodic page request that contains a parameter that tells authlogic not to update last_updated_at.
Does anyone have ideas for how this could be done? I think this would be a very useful addition to Authlogic (which is the bomb, by the way)
Thanks everyone
Justin
@jsarma you could use the logged_in_timeout/logout_on_timeout settings for # 1 (the default is 10 minutes). I think # 2 is mostly out-of-scope for authlogic, but it is possible to define a last_request_update_allowed? method on your controller to determine if that column should be updated.
(closing, but feel free to reopen)