Hi,
I would like to implement something like “go back to previous page is
session has expired” in my app.
If after 1 hour of inactivity the user performs an action, the app
should redirect user to login page, then when the user logs in, she/he
should be redirected to the previous page.
Is there a gem/plug-in or way to do this ?
ps:
I found how set activity limit in env file:
ActiveRecord::SessionStore::Session.recent_activity_limit = 1.hour
ActiveRecord::SessionStore::Session.auto_clean_sessions = 1
… but 2 things left: to perform a redirect after an hour to login page
and redirect to the previous page after user logs in.