ng-idle icon indicating copy to clipboard operation
ng-idle copied to clipboard

What if window closes while logged in

Open alexandroscgb opened this issue 7 years ago • 1 comments

Just a question. I'm using localStorageService to store user credentials so the session persists on multiple tabs in same window and different windows of the same browser, offering persistent session even if the window closes; only close session button or timing out using this library effectively closes the session.

Is it possible to keep on watching the idle time while there is no window or tab? I log in, close the window or tab and wait the time set for the timeout. When I open the window again, should the session be closed or open? I think that maybe because there is no context, no browser data at all? This library would start the countdown again, right?

Thanks.

alexandroscgb avatar Sep 28 '17 20:09 alexandroscgb

You are correct, it's session-based so when the browser closes, all the idle information goes again. When going back to the site, you'll have to start watching again and it'll be starting a new session.

There currently isn't support for a permanent session. I suppose it could be possible by letting you choose to use localStorage instead of sessionStorage.

grbsk avatar Sep 29 '17 19:09 grbsk