Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for triggering idle and resume manually. #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jfren484
Copy link

@jfren484 jfren484 commented Aug 8, 2013

I am using this plugin to manage the user session in my application, but we needed it to work across multiple tabs/windows. Here's the scenario. User logs in and navigates to a page in our application, and then opens a new tab for a different page in our application (e.g. a list of items for the first tab, and the detail page for a specific item as the second tab). If the user works in the second tab for a while and doesn't return to the first one, the timeout fires on that first tab even though they're still active, logs them out after the countdown, and then the second tab behaves badly. At best it redirects to the login page, but ajax requests from that page return strange results.

My solution was to use SignalR to communicate between windows and allow one window to cancel the countdown in another window and then start the countdown when the last window to the application has gone idle. I had to make a small change to the plugin to allow me to do this, so that's what I'm requesting a pull for.

I'd like to package my entire solution (along with the idleTimer and idleTimeout files) and put it on NuGet, but I haven't done that before, so we'll see if I can get that to happen.

Added exposed methods to allow triggering of idle or resume manually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant