HomePhabricator
Diffusion Comm 030104821306

[keyserver] try registerUser if loginUser fails in keyserver logInResponder

Description

[keyserver] try registerUser if loginUser fails in keyserver logInResponder

Summary:
Changes are as follows:

  1. Modified Identity service to send back "not found" status to caller (it was previously eating this up and closing the connection)
  2. Modified loginUser function in rust-node-addon to propagate the not found error to js if encountered
  3. Wrapped the loginUser call in logInResponder in a try-catch so that if we get back the "not found" error, we attempt a registerUser call instead

Normally I'd make this 3 diffs, but this is urgent

Test Plan: tried logging in with a user in my local MariaDB instance but not in localstack DDB, saw that a new entry was made in DDB upon successful login

Reviewers: ashoat, jon, bartek, tomek

Reviewed By: ashoat, bartek

Subscribers: atul

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

Details

Provenance
varunAuthored on Mar 6 2023, 10:32 PM
Reviewer
ashoat
Differential Revision
D6960: [keyserver] try registerUser if loginUser fails in keyserver logInResponder
Parents
rCOMM3dc46d29f50b: [native] Fix useIsCurrentUserStaff hook
Branches
Unknown
Tags
Unknown