Page MenuHomePhabricator

[services][identity] add un-signed SIWE message to WalletLoginRequest
ClosedPublic

Authored by varun on Jun 16 2022, 1:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 2:15 PM
Unknown Object (File)
Fri, Nov 22, 12:27 PM
Unknown Object (File)
Fri, Nov 22, 12:27 PM
Unknown Object (File)
Fri, Nov 22, 12:27 PM
Unknown Object (File)
Fri, Nov 22, 12:27 PM
Unknown Object (File)
Fri, Nov 22, 12:27 PM
Unknown Object (File)
Fri, Nov 22, 12:27 PM
Unknown Object (File)
Fri, Nov 22, 12:27 PM

Details

Summary

we don't need a walletAddress field but we do need to include the raw message (which contains the address, among other things).

Test Plan

successfully compiled the protos

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Jun 16 2022, 1:10 PM

change token to string to stay consistent with PAKE login

ashoat requested changes to this revision.Jun 17 2022, 9:24 AM

Questions inline

native/cpp/CommonCpp/grpc/protos/identity.proto
61 ↗(On Diff #13548)

message feels too generic

62 ↗(On Diff #13548)

Is this a MAC for the message, or something else? Would be good to be more specific here too, I think

66 ↗(On Diff #13548)

I thought we had a more specific term we were using here?

This revision now requires changes to proceed.Jun 17 2022, 9:24 AM

address feedback

native/cpp/CommonCpp/grpc/protos/identity.proto
62 ↗(On Diff #13548)

it's the SIWE message that's been signed

66 ↗(On Diff #13548)

yeah we switched to AccessToken to refer to the struct in the Identity service, which looks like:

pub struct AccessToken {
  pub user_id: String,
  pub device_id: String,
  pub token: String,
  pub created: DateTime<Utc>,
  pub auth_type: AuthType,
  pub valid: bool,
}

Since this token maps to the token field in this struct, I think they should have the same name. Maybe we can rename the struct to AccessTokenData and the field to access_token?

ashoat requested changes to this revision.Jun 17 2022, 4:12 PM

Maybe we can rename the struct to AccessTokenData and the field to access_token?

That sounds good to me, passing back to you for those changes

This revision now requires changes to proceed.Jun 17 2022, 4:12 PM

address feedback about naming

This revision is now accepted and ready to land.Jun 22 2022, 11:11 AM

(Might be good for other reviewers to take a look at this... if they're reviewing the rest of the stack, probably good for them to be on this one too)

Wouldn't block the deadline on it, though

This revision is now accepted and ready to land.Jun 23 2022, 10:54 AM