Online and Offline status with Inactive session timeout
I am trying to add this logic to my solution where i can know the exact status of online and offline users (both app and web). One part of the solution is that persisting a custom property with User object and update it on different events like login, logout or close the browser/tab. But there is on 'inactivity session timeout' feature that throws out any user if there is no activity. How could i set my custom property as and when 'inactivity session timeout' happens?