Logout (P3)
Context
This operation happen when user want to logout, from Webmail or Cryptpad
Modules involved
- logout page of SSO
- Aurion Plugin
- Cryptpad
- webmail iframe
- pad iframe
States
Asked from Webmail or Cryptpad
- Redirect to page
logoutSSO page - User confirm logout
- message
LOGOUT_ASKEDis sent to webmail iframe and pad iframe. - These iframe try to send message to tabs with origin
padandwebto ask for logout. For cyrptpad, it ispre-loading.jsfile which create a listener for that event. If receveied, it forward event topre-loading.jsof sand, which will simulate a click on logout button of Cryptpad. For the webmail, it is the plugin which listen for that event and active logout because we have already wrotelogoutAsked. (TODO: maybe there is no need to do that) - if tabs are opened, they are deconnected gracefully with built-in logout. On the contrary, we remove from their localtorage auth cookies. (TODO : remove Aurion IndexedDB as well)