element-hq / element-hq/element-web

Feature request: log out the session browser window is closed

Open
#25,151 2 comments 0 reactions 0 assignees View on GitHub
T-Enhancement X-Needs-Product
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.