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
F1789751: D6946.id.diff
Sun, May 19, 4:50 AM
F1789375: D6946.id23428.diff
Sun, May 19, 3:05 AM
F1789232: D6946.id23395.diff
Sun, May 19, 2:33 AM
Unknown Object (File)
Sat, May 11, 10:43 AM
Unknown Object (File)
Sat, May 11, 10:24 AM
Unknown Object (File)
Sat, May 11, 10:24 AM
Unknown Object (File)
Sat, May 11, 10:24 AM
Unknown Object (File)
Sat, May 11, 10:24 AM
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