Page MenuHomePhabricator

[native] use findUserID RPC in UsernameSelection component
ClosedPublic

Authored by varun on Mar 13 2024, 6:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 23, 9:12 AM
Unknown Object (File)
Wed, Oct 23, 9:12 AM
Unknown Object (File)
Wed, Oct 23, 9:11 AM
Unknown Object (File)
Oct 18 2024, 1:58 PM
Unknown Object (File)
Sep 16 2024, 10:05 AM
Unknown Object (File)
Sep 16 2024, 10:05 AM
Unknown Object (File)
Sep 15 2024, 8:28 AM
Unknown Object (File)
Sep 15 2024, 7:23 AM
Subscribers

Details

Summary

If usingCommServicesAccessToken, we should call the identity service RPC instead of the keyserver exactSearchUser API

if the username is reserved or registered on the identity service, we should set the username_taken error

Test Plan

enabled usingCSAT and tried to register an already registered and a reserved username, both failed with the username_taken error

Diff Detail

Repository
rCOMM Comm
Branch
limit1keyserver (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested review of this revision.Mar 13 2024, 7:11 PM
bartek added inline comments.
native/account/registration/username-selection.react.js
95–97

As a follow up, it'd be good to create a wrapper over commRustModule.findUserIDFor___() which returns proper flow-typed FindUserIDResponse = { +userID: string; +isReserved: boolean }, optionally also checked with a validator.

ashoat added inline comments.
native/account/registration/username-selection.react.js
95–97

@varun can you create a task for this? I wonder if it should be in IdentityServiceClient

104

It looks like this logic changed. If you're sure it's okay to change, you can leave as-is. I haven't dug into whether this change is okay, but it would be really simple to just keep the old logic

This revision is now accepted and ready to land.Mar 15 2024, 10:34 AM