Page MenuHomePhabricator

[keyserver] double-write to identity service from siweAuthResponder callpoint
ClosedPublic

Authored by varun on Mar 3 2023, 12:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 6, 5:10 AM
Unknown Object (File)
Thu, Mar 28, 7:25 PM
Unknown Object (File)
Feb 27 2024, 11:49 PM
Unknown Object (File)
Feb 27 2024, 11:49 PM
Unknown Object (File)
Feb 27 2024, 11:49 PM
Unknown Object (File)
Feb 27 2024, 11:48 PM
Unknown Object (File)
Feb 27 2024, 11:42 PM
Unknown Object (File)
Feb 21 2024, 12:30 PM
Subscribers

Details

Summary

we should double-write siwe account creations and logins to the identity service using the loginUserWallet function in the rust-node-addon.

Depends on D6945

Test Plan

logged in on web with my rainbow wallet, saw that the same user data was written to MariaDB and DynamoDB

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Mar 3 2023, 1:05 AM
ashoat added inline comments.
keyserver/src/responders/user-responders.js
569 ↗(On Diff #23395)
This revision is now accepted and ready to land.Mar 3 2023, 9:00 AM
keyserver/src/responders/user-responders.js
569 ↗(On Diff #23395)

@jon's approach in D6944 is actually probably better... I should've suggested that. Basically we don't need to wait on getRustAPI() at all since we're wrapping the call with handleAsyncPromise. So instead we can construct a promise that composes getRustAPI() with the later call

This revision was landed with ongoing or failed builds.Mar 3 2023, 1:29 PM
This revision was automatically updated to reflect the committed changes.
keyserver/src/responders/user-responders.js
575 ↗(On Diff #23428)

This should be awaited though, no? If we don't await, I think there's a risk of an unhandled promise exception from Node