-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
adds activity timeout to version 2.x #55
Conversation
Hi @opheus2 Thank you for your PR. I would like to take some time to understand the possible cause of this since the logic is only using the middleware instead of mouse or keyboard activity. I'm thinking to have like this implemented in the frontend rather than in the middleware. Probably similar to this library to detect user activity. |
I believe a backend approach is preferable for this, as it's more of a security enhancement. So, we would just need to include the last activity time in a session for each request, which is quite simple. If there's no activity for the specified period, we will set the session's lock screen to true. This would be detected during the next request, and the user would need to log in again. It's simple and straightforward but it's a great addition for people using filament as an admin panel for admins only |
BTW you only need to add the middleware if you need to use it. So there is no breaking change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🍻
This PR adds the ability to add a timeout to automatically lock session if no activity after a set duration of time.
usage