HomePhabricator
Diffusion Comm 169c727790e9

[identity] wallet login

Description

[identity] wallet login

Summary:
this RPC is called by both new and existing users signing in with an ethereum wallet. as a result, we need to use the wallet address to check if the user exists before determining whether to update a given user in DDB or create a new entry. we return an access token on successful login.

used the siwe-rs crate to verify the SIWE signature.

Depends on D7539

Test Plan: called the RPC, got back an access token, saw that a new item was created in DDB. then tried logging in again with the same wallet and the existing item in DDB users table was updated.

Reviewers: ashoat, jon, bartek

Reviewed By: jon

Subscribers: tomek, atul

Differential Revision: https://phab.comm.dev/D7540

Details

Provenance
varunAuthored on Apr 19 2023, 12:09 PM
Reviewer
jon
Differential Revision
D7540: [identity] wallet login
Parents
rCOMM6ba1ea2a7c94: [identity] finish login
Branches
Unknown
Tags
Unknown