HomePhabricator
Diffusion Comm cb71eb7aa232

[native] Add support for doNotRegister to useSIWEServerCall

Description

[native] Add support for doNotRegister to useSIWEServerCall

Summary:
Back in D8753, we added this flag so that we could prevent web clients from registering an account via SIWE (ENG-2930).

For ENG-4074 we want to do something similar bit a little different on native. We have a SIWE flow for login, and are introducing a new one for registration. We want to use the doNotRegister flag to prevent account creation via the SIWE login flow, so that we can redirect the user to the registration flow.

Test Plan:
I tested this diff stack as follows:

  1. Delete test ETH account 1. Attempt to do main SIWE login with ETH account 1. Confirm it redirects to registration flow. Complete registration flow and confirm account successfully created
  2. Same as above, but go back after reaching the avatar screen, and then forward to see the Ethereum screen. Choose the option to use the already connected ETH account, then complete registration flow and confirm account successfully created
  3. Same as above, except in the Ethereum screen, choose the option to "skip" the Ethereum login. Confirm password account is successfully created
  4. Same as above, except in the Ethereum screen, select another Ethereum wallet that already has a Comm account. Confirm that we hit ExistingEthereumAccount, and that we're able to login directly with the existing account
  5. Same as above, except in the Ethereum screen, select another Ethereum wallet that doesn't already have a Comm account. Confirm that the account is successfully created using the second Ethereum wallet and not the first
  6. Same as above, except in the Ethereum screen, go through the auth flow again for the exact same wallet. Confirm that the account is successfully created

Note that I needed to apply this patch to work around ENG-6097.

Reviewers: atul, ginsu

Reviewed By: atul

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on Dec 17 2023, 3:57 PM
Reviewer
atul
Differential Revision
D10412: [native] Add support for doNotRegister to useSIWEServerCall
Parents
rCOMMb7b127fcc50b: [web] avoid initializing already initialized WASM module
Branches
Unknown
Tags
Unknown