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

Feature request: log out the session browser window is closed #25151

Open
AnassDriate opened this issue Apr 18, 2023 · 2 comments
Open

Feature request: log out the session browser window is closed #25151

AnassDriate opened this issue Apr 18, 2023 · 2 comments
Labels
T-Enhancement X-Needs-Product More input needed from the Product team

Comments

@AnassDriate
Copy link

Steps to reproduce

Hello,

If you close the browser without signing out from your Element session, the session will still remain open. If another user uses the same browser he will be able to log in to your session/account.

This is the same as #10421 but the solution that was propose in #10421 affects all the clients (mobile, fat clients, and web), we would like to keep fat-clients always open (because they have all the encryption keys....)

The solution proposed by Enannos in #10421 sounds great work-around (even a correct solution), but the bundle.js does not contain the information mention by Enannos :

Search into bundle.js for mx_access_token
Find localStorage.getItem("mx_access_token") and replace with sessionStorage.getItem("mx_access_token")

Outcome

For security reasons, the session should close when the user close the browser.

Operating system

No response

Application version

No response

How did you install the app?

No response

Homeserver

No response

Will you send logs?

Yes

@t3chguy
Copy link
Member

t3chguy commented Apr 19, 2023

This is not a defect, it works as designed. You're asking for a new feature, a mode where things are deleted on logout. Issue with that is not all web storages can be configured to expire like this. Only SessionStorage is available for that purpose, IndexedDB is also required and that cannot expire as such. And when you're closing a browser the app is not guaranteed any further time to clean up any asynchronous calls.

@t3chguy t3chguy added X-Needs-Product More input needed from the Product team T-Enhancement and removed T-Defect labels Apr 19, 2023
@AnassDriate
Copy link
Author

@t3chguy
Thank you for your clarification, very clear.
It will be great to add/implement this feature in the future.
Regards,

@richvdh richvdh changed the title Session logout when closing the browser not working only for webclient Feature request: log out the session browser window is closed Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Enhancement X-Needs-Product More input needed from the Product team
Projects
None yet
Development

No branches or pull requests

2 participants