HomePhabricator
Diffusion Comm 7a6a2ce0c3d8

[lib][web][native] Handle invalidSessionDowngrade for identity actions

Description

[lib][web][native] Handle invalidSessionDowngrade for identity actions

Summary: When we start using CSAT, we can use identityInvalidSessionDowngrade (D10962) to check if session downgrade is valid. Until then we have to use the old logic, because CSAT is always undefined, so we cannot check if identity session changed, and if the same user logs backin, the session downgrade may be incorrectly considered valid

Test Plan:
Tested that if using CSAT, and a different CSAT is present in state and in preRequestUserState, then this code returns
Tested that if currentUserInfo and preRequestUserState.currentUserInfo are the same, and CSAT is present in state and in preRequestUserState are the same, and a user is logged in and the action is trying to downgrade the session - then resetUserSpecificStateOnIdentityActions is called and action goes to the next reducers
Tested that if using CSAT currentUserInfo and preRequestUserState.currentUserInfo are different, then this code returns
Tested that if not using CSAT, this code correctly disregards an action performing an invalid session downgrade

Reviewers: michal, kamil, ginsu

Reviewed By: michal

Subscribers: ashoat, tomek

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

Details

Provenance
inkaAuthored on Feb 5 2024, 9:20 AM
Reviewer
michal
Differential Revision
D10965: [lib][web][native] Handle invalidSessionDowngrade for identity actions
Parents
rCOMM12b824a049d1: [web][native] Handle invalidSessionDowngrade for…
Branches
Unknown
Tags
Unknown