Hi,
very very casual rails user here (mostly via Ruby, which I use for general programming). Some time ago I developed a simple rails app to visualize some data and store it in a database. For authentication, I used the built-in authentication generator (I believe…it’s been a while).
While that works great, the user never gets logged out as one might expect after idling for a while. I believe this has to do with sessions. From what I can gather, the session controller comes with a method self.sweep, which is meant to wipe stale sessions and force a user to re-authenticate.
What I don’t get is how that is supposed to run - since that sweep method is never called, and as far as I can tell there isn’t any place where I could place that call to be run every x minutes or integrate it somehow into each user request.
Is this supposed to go into a file I am missing, or a cron job (if so, I am not clear on how that would work).
Anything I am missing here? Thanks in advance for any hints.
Cheers, Marc