Return to login screen when session expires
I am using the auto-expire setting for a user's login session under Admin >Security Settings as this is really important for my website.
Would it be possible to automatically redirect the user to the login page when their login session expires?
The reason I ask is because I am using DataTables and if the user tries to search the DataTable when their login session has expired then an error is thrown. But the user isn't to know that the error has been caused by the fact that their session has expired. If they were auto redirected to the login screen then I think this would improve the user flow...
Thanks for the message.
These are frontend pages of my website that are using the website membership plugin.
When the user refreshes the page they will be returned to the login screen.
Generally, the expiry is only checked on page load, so to do this without a refreshing will require some custom scripting to periodically check the user's login status.
If you need any hands-on help setting this up feel free to send us an estimate request (https://www.interactivetools.com/estimate/) - otherwise I'm happy to answer any more specific questions you have.
That's really excellent advice, thank you very much.
I will see if I can get this working myself and if not then be in touch with you guys again!
A session expires at the set interval after the browser is closed. An interval of 30 minutes means 30 minutes after quitting the browser. An interval of 0 means as soon as the browser is closed. Reopening the browser to the site within the interval, resets the timer.