HomePhabricator
Diffusion Comm b98fc1131296

[identity] update login_password_user_start and register_password_user_start

Description

[identity] update login_password_user_start and register_password_user_start

Summary:
in these two methods, we now need to check if the username already exists in the reserved usernames table (which would indicate that it's already been claimed on ashoat's keyserver).

if it already exists in the reserved usernames table when the register RPC is called, we should send back an "already exists" gRPC status.

if it is not found in the users table but already exists in the reserved usernames table when the login RPC is called, we should send back a "failed precondition" gRPC status with a message indicating that the caller should try the new reserved registration RPC introduced earlier in the stack.

Depends on D8062

Test Plan: called the two RPCs with a username from my test reserved usernames table and got back the correct gRPC statuses

Reviewers: jon, bartek

Reviewed By: bartek

Subscribers: ashoat, tomek

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

Details

Provenance
varunAuthored on Jun 1 2023, 2:27 PM
Reviewer
bartek
Differential Revision
D8066: [identity] update login_password_user_start and register_password_user_start
Parents
rCOMM8130a55a1eb5: [identity] register_reserved_password_user_start method
Branches
Unknown
Tags
Unknown