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)
Tue, Dec 3, 8:08 AM
Unknown Object (File)
Mon, Dec 2, 1:42 AM
Unknown Object (File)
Oct 26 2024, 9:10 AM
Unknown Object (File)
Oct 19 2024, 9:30 PM
Unknown Object (File)
Oct 19 2024, 5:03 PM
Unknown Object (File)
Oct 18 2024, 5:44 PM
Unknown Object (File)
Oct 18 2024, 5:44 PM
Unknown Object (File)
Oct 18 2024, 9:56 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