hydrogen-web icon indicating copy to clipboard operation
hydrogen-web copied to clipboard

Logout automatically when access token is invalid

Open bwindels opened this issue 3 years ago • 3 comments

To support remote wiping of keys

bwindels avatar Jul 18 '22 08:07 bwindels

So this can be detected by looking at the sync status on Sync which should be Error, and the error property should have a HomeServerError where the errcode property would be something that is listed in the spec for invalid acces token.

We don't need to do a server request as the access token is already invalid. We go to the logout view model with a different message (e.g. you've been logged out elsewhere, press continue to proceed) without the ability to cancel.

bwindels avatar Aug 16 '22 09:08 bwindels

how to tell logoutviewmodel that the alternative message should be shown? parameter in the url? e.g. /session//logout/expired

bwindels avatar Aug 16 '22 09:08 bwindels

Actually, we should probably immediately start to remove the local cache when moving to the screen (as allowing users to keep their cache is not something we want to encourage when they've been remotely logged out), and make the continue button just move to the next screen so they get a chance to read the message first.

bwindels avatar Aug 16 '22 10:08 bwindels