Page MenuHomePhabricator

[services][identity] helper function to handle sign-in with ethereum
AbandonedPublic

Authored by varun on Jun 1 2022, 2:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 10:35 PM
Unknown Object (File)
Thu, May 2, 10:35 PM
Unknown Object (File)
Thu, May 2, 10:35 PM
Unknown Object (File)
Tue, Apr 30, 6:35 PM
Unknown Object (File)
Sun, Apr 28, 4:34 PM
Unknown Object (File)
Fri, Apr 26, 11:57 AM
Unknown Object (File)
Tue, Apr 23, 7:42 PM
Unknown Object (File)
Tue, Apr 23, 7:42 PM

Details

Summary

This helper function takes a String representing a EIP-4361 Message and a signature and verifies the message. It returns an Error if verification fails.

Test Plan

todo!

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested review of this revision.Jun 1 2022, 2:30 PM
tomek added inline comments.
services/identity/src/service.rs
152–155

Could you clarify when we should use String and when &str? For nonce we use Option<&str> but for a message String. Can't we use e.g. &str for both?

This revision is now accepted and ready to land.Jun 2 2022, 12:59 AM
This revision now requires review to proceed.Jun 2 2022, 12:59 AM
jim requested changes to this revision.EditedJun 3 2022, 8:30 AM

wallet_login just doesn't seem necessary. What's wrong with the existing siwe API you're calling in this helper?

services/identity/src/service.rs
152–155

message should be a &str

This revision now requires changes to proceed.Jun 3 2022, 8:30 AM

Preempting being added to this diff given the new dependency