diff --git a/native/native_rust_library/src/identity_client.rs b/native/native_rust_library/src/identity_client.rs --- a/native/native_rust_library/src/identity_client.rs +++ b/native/native_rust_library/src/identity_client.rs @@ -204,7 +204,7 @@ user_id: String, signing_public_key: String, siwe_message: String, - siwe_signature: Vec, + siwe_signature: String, ) -> Result { // Create a LoginRequest channel and use ReceiverStream to turn the // MPSC receiver into a Stream for outbound messages diff --git a/native/native_rust_library/src/lib.rs b/native/native_rust_library/src/lib.rs --- a/native/native_rust_library/src/lib.rs +++ b/native/native_rust_library/src/lib.rs @@ -82,7 +82,7 @@ user_id: String, signing_public_key: String, siwe_message: String, - siwe_signature: Vec, + siwe_signature: String, ) -> Result; // Tunnelbroker Service Client @@ -171,7 +171,7 @@ user_id: String, signing_public_key: String, siwe_message: String, - siwe_signature: Vec, + siwe_signature: String, ) -> Result { RUNTIME.block_on(identity_client::login_user_wallet( client, diff --git a/services/identity/src/service.rs b/services/identity/src/service.rs --- a/services/identity/src/service.rs +++ b/services/identity/src/service.rs @@ -335,7 +335,7 @@ user_id: &str, signing_public_key: &str, siwe_message: &str, - siwe_signature: Vec, + siwe_signature: &str, ) -> Result<(), Status> { if user_id.is_empty() || signing_public_key.is_empty() { error!( @@ -352,7 +352,7 @@ } }; match siwe_message.verify( - match siwe_signature.try_into() { + match siwe_signature.as_bytes().try_into() { Ok(s) => s, Err(e) => { error!("Conversion to SIWE signature failed: {:?}", e); @@ -383,7 +383,7 @@ &wallet_login_request.user_id, &wallet_login_request.signing_public_key, &wallet_login_request.siwe_message, - wallet_login_request.siwe_signature, + &wallet_login_request.siwe_signature, )?; client .update_users_table( diff --git a/shared/protos/identity.proto b/shared/protos/identity.proto --- a/shared/protos/identity.proto +++ b/shared/protos/identity.proto @@ -84,7 +84,7 @@ // ed25519 key for the given user's device string signingPublicKey = 2; string siweMessage = 3; - bytes siweSignature = 4; + string siweSignature = 4; // Information specific to a user's device needed to open a new channel of // communication with this user SessionInitializationInfo sessionInitializationInfo = 5;