Page MenuHomePhabricator

[web] Add invalidSessionRecovery checks for web
ClosedPublic

Authored by ashoat on Mar 31 2024, 7:48 PM.
Tags
None
Referenced Files
F3356918: D11503.id38674.diff
Sat, Nov 23, 9:28 PM
F3356384: D11503.diff
Sat, Nov 23, 6:43 PM
Unknown Object (File)
Tue, Nov 12, 2:29 PM
Unknown Object (File)
Tue, Nov 12, 2:29 PM
Unknown Object (File)
Tue, Nov 12, 2:25 PM
Unknown Object (File)
Tue, Nov 12, 10:40 AM
Unknown Object (File)
Fri, Nov 1, 10:15 PM
Unknown Object (File)
Oct 11 2024, 10:12 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