Page MenuHomePhabricator

[keyserver] Move doNotRegister check higher in siweAuthResponder
ClosedPublic

Authored by ashoat on Dec 20 2023, 1:58 PM.
Tags
None
Referenced Files
F2903614: D10418.id34884.diff
Sat, Oct 5, 11:25 PM
Unknown Object (File)
Fri, Sep 27, 9:10 AM
Unknown Object (File)
Fri, Sep 27, 9:10 AM
Unknown Object (File)
Fri, Sep 27, 9:08 AM
Unknown Object (File)
Fri, Sep 27, 9:02 AM
Unknown Object (File)
Sat, Sep 7, 3:39 PM
Unknown Object (File)
Fri, Sep 6, 5:32 PM
Unknown Object (File)
Aug 28 2024, 2:41 AM
Subscribers

Details

Summary

I want to avoid invalidating the nonce so that we can use the same SIWE message for registration later.

This way, a user can attempt to press the main SIWE button and find out that they need to register a new account, without needing to go through the SIWE flow again.

Depends on D10417

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.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage