Open Closed

Session Timeout Warning and Countdown (Last 30 Seconds) #9273


User avatar
0
yunusemrecaglar created

I would like to display a warning screen when the session is about to expire, showing the remaining time with a countdown. I also want to show this warning specifically when there are only 30 seconds left. How can I implement this?


1 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, we have introduced a new feature called Idle Session Timeout, and it seems this is what you are looking for: https://abp.io/docs/latest/modules/account/idle-session-timeout

    This feature was introduced in v9.1, so in your version, it can not be used. And I guess you can't update your version, so I can explain you what this feature does, and how it works, so maybe you can implement it your own project:

    1. We created an AccountIdleViewComponent and added it as a layout hook, so we can show a dialog to warn users, when the inactivity is detected, and they should either confirm the model to stay signed it or do nothing to be logged out automatically.
    2. We also created a js file that is added with the component, so we can check for the inactivity by using JS API, and then show the hidden component/model in the page, to warn the user.
    3. We also created a setting group, so admins can decide the inactivity period, but in your case, you can make it hardcoded and check for 30 seconds.

    Regards.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on May 14, 2025, 07:53