Logout after period of inactivity (Xano Auth)

Hello

Is it possible to automatically logout the user after a period of inactivity?
I have looked at timed workflows on page load>Xano Auth Logout, but this doesn’t account for the user activity. Can anyone help, please?

Thanks!

Here’s a thought.
Every time a secured page is access write the access time to a session table updating the active session time. As well when a page is loaded check the session table via a page/global workflow and if the last session time is too old then they are considered logged out.

And/Or

Create a variable what is stored in local storage which contains the time stamp of the last page load and if that is too old then don’t allow access to secured pages.

And/Or

You can also set up something on global/page workflow with a time delay which is reset at every page load. If the delay finishes then you can do a Xano Auth Logout

2 Likes

@peteletkemansst How would you reset the time delay? Isn’t each workflow run until completion once its triggered? How could you cancel a time delay once it’s started?