HomePhabricator
Diffusion Comm 8ba944173c98

[lib] Wipe keyserver store on login

Description

[lib] Wipe keyserver store on login

Summary:
issue: ENG-7531
Because keyserverStore is excluded from being wiped by resetUserSpecificState on both web and native, we need to handle it in its reducer.
We wipe it on login and register actions for the same reason why we wipe all other stores - in case logout success doesn't manage to come before the user manages to login, we don't want the second user to see the data of the previous user

Test Plan:
Forced logout siccess to be discarded (this is how I initially encountered the bug - identityInvalidSessionDowngrade would discard the action)

Before my changes, if I logged onto a user, I could see in their keyserver list all keyservers the previous user had added
After my changes, the second user had only the auth keyserver in their store

Reviewers: michal, tomek, kamil

Reviewed By: michal

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D11437

Details

Provenance
inkaAuthored on Mar 28 2024, 7:03 AM
Reviewer
michal
Differential Revision
D11437: [lib] Wipe keyserver store on login
Parents
rCOMM362fadd02e70: [lib][web][native] Handle idnentity login in reducers
Branches
Unknown
Tags
Unknown