HomePhabricator
Diffusion Comm f69717dd8ed8

[native] Call keyserver version endpoint to confirm user's keyserver selection

Description

[native] Call keyserver version endpoint to confirm user's keyserver selection

Summary:
Before this diff, we completely ignored the keyserverUsername. The idea was that the user would enter another user's username there, and that the client would then query the identity service to ask how to talk to that keyserver.

Since the identity service isn't ready yet, instead we're going to have the user enter a URL prefix for the keyserver they want to talk to. This diff makes that change, and also calls the new version endpoint to make sure that the keyserver URL that the user entered points to a valid keyserver.

Depends on D8191

Test Plan:
Tested in combination with the rest of the stack as follows:

  1. Override defaultURLPrefix in native/utils/url-utils.js to return some random string. This makes sure that the "default" of Ashoat's keyserver does not work, and makes it so the registration flow only works if the user selects a custom keyserver and all of the server calls in the registration flow use that custom keyserver
  2. Test the registration flow end-to-end for an Ethereum account
  3. Test the registration flow end-to-end for a username/password account
  4. Test the registration flow end-to-end for a username/password account with a custom avatar that requires an image upload
  5. Make sure that for all registrations, the correct avatar appears in the ChatThreadList when the RegistrationNavigator dismisses

Reviewers: atul, ginsu

Reviewed By: ginsu

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on Jun 12 2023, 12:23 PM
Reviewer
ginsu
Differential Revision
D8192: [native] Call keyserver version endpoint to confirm user's keyserver selection
Parents
rCOMM9090946b7ebe: [lib] Introduce action for new getVersion endpoint
Branches
Unknown
Tags
Unknown