Fix for issue https://github.com/piwik/piwik/issues/7316 Now, no idle user could spend more than 3 days opening the piwik admin panle idle. Added jquery script whic tracks user engagement with the site.
Additionally, I have given 3 days of inactivity in Piwik admin page as session expiry time. But, we could adjust this based on our collective decision.
\ Possible scenarios when this is most useful,
Also, it will never auto-expire when user is not idle.
what you want to achieve is that user should be logged out after N days of inactivity. To do this we need to do it server side rather than client side. Otherwise if you close the browser and wait 10 days you would still be logged in... the correct way would be to somehow change the Login plugin authentication or so to enforce this maximum of N days.
Hi @mattab This is the only case which I suppose is not covered in my fix, I have a pure client-side based solution for this case with very little support needed from server-end, I am working in this and will soon publish the fix for the benefit of everyone. Because I don't want to poll (load) the DB periodically with HTTP requests, my solution should be quite unique!
hi i used above solution which you shared but session is not getting expired after sometime.
@mahesh978 It has been long time since I suggested functionality this PR. I don't have control over this much. But as far as I know, I tested this piece of jquery script and it worked fine. May be it's not loaded correctly in your case. Just copy my code alone and paste it right before closing
I have created sample HTML page in pastebin to test it for 10 seconds inactive browser tab. Double click the page and switch to another tab. It will redirect to logout page in 10 seconds when idle.
thanks for your reply @saleemkce but still there is no session logout after 15 sec also and alert is also not coming which i added in js.
the same html code is working fine but i think the issue with matomo only
@mahesh978 "alert is also not coming which i added in js." which denotes that JS is not loaded in your admin site properly. Please try other methods to load the JS. It should work fine then.
yaa @saleemkce may be file is not getting loaded is there any other way to load js