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)
-
0
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:
- 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. - 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.
- 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.
- We created an