HomePhabricator
Diffusion Comm 304bee8cd1aa

[lib][native] Deprecate DispatchRecoveryAttempt in favor of…

Description

[lib][native] Deprecate DispatchRecoveryAttempt in favor of DispatchActionPromise

Summary:
This diff does away with the DispatchRecoveryAttempt function.

We need the types to be consistent with DispatchActionPromise so that we can define the business logic in keyserverAuth in a generic way, where it can work for either a normal auth (DispatchActionPromise) or a recovery (formerly DispatchRecoveryAttempt, now also DispatchActionPromise).

I initially considered unifying the types but keeping the dispatchRecoveryAttempt function around for the logic it performs with callSingleKeyserverEndpointCallback. But then I realized that logic won't work for the identity service-based auth workflow, where we'll want to fallback to the legacy auth workflow if the new one fails. The logic inside callSingleKeyserverEndpointCallback isn't built to handle multiple keyserver calls... there's just one single callSingleKeyserverEndpointCallback variable for the whole "business logic" wrapped by resolveKeyserverSessionInvalidation. In a later diff, I make resolveKeyserverSessionInvalidation wrap a generic async function that can perform any business logic, and at that point being able to support multiple keyserver calls within the wrapped logic will be helpful.

Depends on D11223

Test Plan: I used this test plan for the whole stack: https://gist.github.com/Ashoat/75ab690d5c53cdd68a51b02e03e27c58

Reviewers: inka, tomek

Reviewed By: tomek

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

Details