Catch logout due to inactivity?

I’m using the JS code example from @Soluntech to catch and log login/logout activity (see Last Login and Logout (View Based) — Custom Software Services for Forward-Thinking Organizations) - which works great.

But is there any way to also catch automated logouts due to inactivity?

1 Like

Hi @DeeGee,

We have not implemented that solution, it might be possible by storing the token in cookies or local storage, and verifying with the new token.

Although that would not be very reliable.

We hope you can track that information. :rocket:

Hello @DeeGee ,

You can do this by using a variable and timer function in javascript.

in the timer function(run each sec), you can increment this variable by 1 sec.

but at any activity(mouse move, key press) make that variable to 0.

So if a variable reaches a value more than the set value then we trigger the logout click function.

Sunny Singla