Page MenuHomePhabricator

[keyserver] add loginUserWallet function
ClosedPublic

Authored by varun on Mar 2 2023, 8:57 PM.
Tags
None
Referenced Files
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, 3:59 AM
Unknown Object (File)
Feb 21 2024, 3:59 AM
Subscribers

Details

Summary

expose a new client function to double-write siwe login info to the identity service

Test Plan

this gets tested in the next diff where we call loginUserWallet from user-responders.js

Depends on D6942

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Mar 2 2023, 9:12 PM
jon requested changes to this revision.Mar 2 2023, 11:04 PM
jon added inline comments.
keyserver/addons/rust-node-addon/src/identity_client/login_user.rs
13–29 ↗(On Diff #23391)

we should probably refactor this into a call, like identity_client::open_channel

37 ↗(On Diff #23391)

can we rename response to something more meaningful? like response_stream or something that doesn't sound like a singular discrete object?

68 ↗(On Diff #23391)

handle_ makes it sounds like it's likely to fail, or doing a dispatch call. I would rather use something like get_

This revision now requires changes to proceed.Mar 2 2023, 11:04 PM
varun marked an inline comment as done.

address feedback

Why is socialProof separate from siweMessage + siweSignature? Is it for the same reason that we pull signingPublicKey from sessionInitializationInfo (convenience)?

Why is socialProof separate from siweMessage + siweSignature? Is it for the same reason that we pull signingPublicKey from sessionInitializationInfo (convenience)?

yeah it's purely for convenience. i use siweMessage in the identity service to verify the siweSignature using the siwe-rs crate. the stringified socialProof goes directly into the DynamoDB table without any deserializaton

keyserver/addons/rust-node-addon/src/identity_client/login_user.rs
13–29 ↗(On Diff #23391)

refactored a little. the anonymous function in the with_interceptor function makes it hard to move the whole thing to a separate function because the result type is hard to type

looks fine to me rust wise

This revision is now accepted and ready to land.Mar 3 2023, 12:53 PM
This revision was automatically updated to reflect the committed changes.