Page MenuHomePhabricator

[web] Add invalidSessionRecovery checks for web
ClosedPublic

Authored by ashoat on Mar 31 2024, 7:48 PM.
Tags
None
Referenced Files
F1786357: D11503.id38674.diff
Sat, May 18, 4:55 PM
Unknown Object (File)
Tue, May 7, 4:32 PM
Unknown Object (File)
Apr 12 2024, 5:41 PM
Unknown Object (File)
Apr 12 2024, 4:19 AM
Unknown Object (File)
Apr 7 2024, 6:19 PM
Unknown Object (File)
Apr 7 2024, 11:23 AM
Unknown Object (File)
Apr 5 2024, 11:47 AM
Unknown Object (File)
Apr 5 2024, 9:53 AM
Subscribers
None

Details

Summary

Now that session recovery is possible on web when usingCommServicesAccessToken, we should add these checks.

This was based on the equivalent code on native. However, since web only has to support the newer auth flow, we can skip the actions for the older auth flow (logInActionTypes.success and siweAuthActionTypes.success).

Depends on D11502

Test Plan

I added an artificial sleep to the callSingleKeyserverEndpoint before the setNewSession call. Then I logged out on web while a session recovery was ongoing, and confirmed via Redux dev tools that both the SET_NEW_SESSION and KEYSERVER_AUTH_SUCCESS were ignored. I also confirmed that a normal session recovery (without a log out in between) still worked

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable