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

Option to end session on tab close #121

Open
as3445 opened this issue Feb 14, 2019 · 2 comments
Open

Option to end session on tab close #121

as3445 opened this issue Feb 14, 2019 · 2 comments

Comments

@as3445
Copy link

as3445 commented Feb 14, 2019

One of the requirements for a project that I am working on is that the session would expire on tab close. I can imagine other may want a similar feature. I propose that this app implement an endpoint that the client can call .onbeforeunload() and the server will invalidate the session.

@claytondaley
Copy link
Contributor

Django has built-in support for this.

@as3445
Copy link
Author

as3445 commented Feb 14, 2019

That will not work if I just close my tab without closing the window.

I have been looking up how I might do this, and actually there's no easy way to differentiate navigation to a new page vs closing the tab. 🤔 So .onbeforeunload() is actually not viable

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

No branches or pull requests

2 participants