Page MenuHomePhabricator

[keyserver] add loginUserWallet function
ClosedPublic

Authored by varun on Mar 2 2023, 8:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 28, 8:47 PM
Unknown Object (File)
Sun, Oct 27, 1:36 PM
Unknown Object (File)
Tue, Oct 22, 7:19 AM
Unknown Object (File)
Sat, Oct 19, 9:30 PM
Unknown Object (File)
Fri, Oct 18, 5:44 PM
Unknown Object (File)
Fri, Oct 18, 9:55 AM
Unknown Object (File)
Fri, Oct 18, 8:56 AM
Unknown Object (File)
Oct 1 2024, 12:03 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
No Lint Coverage
Unit
No Test Coverage

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.