HomePhabricator
Diffusion Comm d8f442299526

[lib] Separate recovery types that are managed by KeyserverConnectionHandler

Description

[lib] Separate recovery types that are managed by KeyserverConnectionHandler

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

Reviewers: inka, tomek

Reviewed By: tomek

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