# Logout Perspective User After Set Time and Not Inactivity

**URL:** <https://forum.inductiveautomation.com/t/logout-perspective-user-after-set-time-and-not-inactivity/86214>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 22, 2024, 8:25pm UTC](https://forum.inductiveautomation.com/t/logout-perspective-user-after-set-time-and-not-inactivity/86214 "2024-02-22T20:25:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![franklepkowski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/franklepkowski/32/4808_2.png) [@franklepkowski](https://forum.inductiveautomation.com/u/franklepkowski)\
**Post date:** [February 22, 2024, 8:25pm UTC](https://forum.inductiveautomation.com/t/logout-perspective-user-after-set-time-and-not-inactivity/86214/1 "2024-02-22T20:25:20Z")

</div>

Hello All,

Curious if anyone has done this with any success as I do not want to re-invent the wheel. I want to implement a way to logout a user after a set time regardless of inactivity. Any information is appreciated.

Thanks,

Frank

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [February 22, 2024, 9:07pm UTC](https://forum.inductiveautomation.com/t/logout-perspective-user-after-set-time-and-not-inactivity/86214/2 "2024-02-22T21:07:12Z")

</div>

Create a custom session property called `UserLoginTime`. When the user logs in or the logged in user changes, shove the current timestamp into the property.

Have a session timer script that checks if A) Someone is logged in and B) the difference between the login time and current time is beyond your decided limit, and call `system.perspective.logout()` if both are true.
