tchapgouv / tchap-web-v4

A Matrix web client for Tchap
https://www.tchap.gouv.fr/
GNU Affero General Public License v3.0
12 stars 5 forks source link

Avertir de ne jamais effacer ses cookies #839

Open odelcroi opened 11 months ago

odelcroi commented 11 months ago

Steps to reproduce

Pourquoi? on perd sa session en effacant les cookies tchap, on perd ses messages si jamais c'est la seule session ouverte

https://app.crisp.chat/website/6dacc68e-de3a-4511-8177-1339616098de/inbox/session_93c2b3e5-c90d-47d6-9a5a-081addfbb46b/

Outcome

What did you expect?

What happened instead?

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

No response

Homeserver

No response

Will you send logs?

Yes

estellecomment commented 11 months ago

I wonder if we can intercept the event of cookie deletion, and display "Are you sure" or "Save your recovery code" or something.

We can be notified of a change to cookies but I think it's too late by that point (the cookie is already deleted). I don't know if the info in the event contains the whole deleted cookie, so that we could reset it. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies/onChanged

There's also this, but it looks less supported (no firefox) : https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/change_event

estellecomment commented 11 months ago

Where to display the warning/info "Do not delete your cookies" ?