How can we trigger a script when any session expires or when user closes the tab or browser

Hi
I am using a customized login and we are storing login details in session variable via script at login. Is there any event in Ignition which get triggers when any session expires and also when user close the browser or tab?
I need to trigger a script at session expire or when user closes the tab or browser.

Regards
Sandeep Mishra

The Shutdown session event should cover the case when the session expires.

I don’t think you get to know when the user closes the tab, but you could try lowering the session timeout to at least get the session to expire sooner after it happens.

https://docs.inductiveautomation.com/display/DOC80/Perspective+Session+Event+Scripts

Hi Kevin,
I have tried to set session timeout at 5 min and kept my browser and designer Idle then I tried to use Shutdown Session event but it’s not working and my script attached to it didn’t get triggered. I think it is because we are not using identity provider for login and we are using a custom login configuration. I guess Session timeout property itself is not applicable in this case. Please suggest if anything can be done in this case.

Thanks
Sandeep Mishra

Leaving your browser open but idle is not the same as session expiration, I think you want to configure the Inactivity Timer for that: https://docs.inductiveautomation.com/display/DOC81/Perspective+Project+Properties#PerspectiveProjectProperties-PerspectiveInactivityProperties

Hi Kevin,

I am not able to find Inactivity property in my designer. I am using ignition 8.0.12 version. Can you please let me know if it is available in some other version (I guess 8.1 may be)?
Also as we are using customize login and updating users details in session properties on login how logout action will in case of inactivity and in case we select close session as action will it trigger the shutdown session event?