HomePhabricator
Diffusion Comm 203cd5e887fb

[keyserver] Split up processSuccessfulLogin

Description

[keyserver] Split up processSuccessfulLogin

Summary:
This diff splits up processSuccessfulLogin into two in order to resolve ENG-8101:

  1. processSuccessfulLogin (same name as before), which does cookie/session stuff, Olm initialization, policy stuff, and other general "session setup" work
  2. fetchRegistrationResult, which fetches the data that we need to send to the user in the response.

There's also a new utility handleSuccessfulLoginResult, which looks at the response from processSuccessfulLogin and decides whether to call fetchRegistrationResult.

The reason for splitting it into two is that in the registration case for both siweAuthResponder and keyserverAuthResponder, we want to do some additional steps between these two (sendMessagesOnAccountCreation, formerly known as processAccountCreationCommon).

Depends on D12038

Test Plan:
I tested the following scenarios and made sure that ENG-8101 was resolved (no "anonymous" username):

  1. I tested account creation via keyserver auth in a multi-keyserver environment
  2. I tested login via keyserver auth in a multi-keyserver environment
  3. I tested legacy account creation in a legacy environment
  4. I tested legacy SIWE account creation in a legacy environment
  5. I tested legacy SIWE login in a legacy environment

Reviewers: inka

Reviewed By: inka

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on May 14 2024, 4:02 PM
Reviewer
inka
Differential Revision
D12039: [keyserver] Split up processSuccessfulLogin
Parents
rCOMMd08814a1fa29: [keyserver] Introduce sendMessagesOnAccountCreation
Branches
Unknown
Tags
Unknown