So I need to implement an auto-logout feature for WordPress. With JavaScript this seems straightforward;
- Prompt after X minutes idle (jQuery.nap), alternate
<title>
to gain attention - If there is no confirmation after Y seconds, run logout
Seeing that the point of an auto-logout feature is security, would that deem it neccessary to have a no-JavaScript fallback?
And if so, the only solution I can see is to store & compare access times on successive requests, but the caveats I can already see are;
- It's no longer 'idle' time (time the user is effectively 'away'), merely time between each page load.
- If a user has walked away, whatever is currently on the page is vulnerable indefinitely, until the next request fires the logout.
I could say, for arguments sake, a server-side solution to log out after Z hours between requests, as opposed to a much shorter time for JavaScript?
What are your thoughts on the matter, and my proposed solution?