Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

What if window closes while logged in #208

Open
alexandroscgb opened this issue Sep 28, 2017 · 1 comment
Open

What if window closes while logged in #208

alexandroscgb opened this issue Sep 28, 2017 · 1 comment

Comments

@alexandroscgb
Copy link

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.

@grbsk
Copy link
Owner

grbsk commented Sep 29, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants