Page MenuHomePhabricator

[lib] Separate recovery types that are managed by KeyserverConnectionHandler
ClosedPublic

Authored by ashoat on Apr 18 2024, 12:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 6:41 AM
Unknown Object (File)
Oct 11 2024, 3:50 PM
Unknown Object (File)
Oct 11 2024, 3:50 PM
Unknown Object (File)
Oct 11 2024, 3:50 PM
Unknown Object (File)
Oct 11 2024, 3:50 PM
Unknown Object (File)
Oct 4 2024, 1:32 PM
Unknown Object (File)
Sep 18 2024, 8:20 AM
Unknown Object (File)
Aug 11 2024, 12:36 PM
Subscribers
None

Details

Summary

Most RecoveryActionSources are initiated by KeyserverConnectionHandler when they are placed into Redux. The exceptions are managed directly by the SQLiteDataHandler on native. Much of the code is shared and extracted to the utils in recovery-utils.js.

By splitting these types, we can improve type safety in several places. We can also add a second protection against triggering this invariant: we know that KeyserverConnectionHandler will check CurrentUserInfo before initiating, so the invariant is safe.

Depends on D11690

Test Plan

Make sure keyserver session recovery still works, and make sure that standard keyserver auth still works

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/shared/session-utils.js
93–100 ↗(On Diff #39240)

This is the most exciting change, but the type changes should help catch errors as well

lib/types/account-types.js
97 ↗(On Diff #39240)

Probably best to start reviewing from here

This revision is now accepted and ready to land.Apr 19 2024, 4:49 AM