From 3f9a20c7a61e0e53dc38384a6a38f084d62b7d7b Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 20 Oct 2022 07:10:35 +0000 Subject: [PATCH] context instead of todo --- web3_proxy/src/frontend/users.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web3_proxy/src/frontend/users.rs b/web3_proxy/src/frontend/users.rs index 3e1515f9..7237fc75 100644 --- a/web3_proxy/src/frontend/users.rs +++ b/web3_proxy/src/frontend/users.rs @@ -194,16 +194,16 @@ pub async fn user_login_post( let our_msg: siwe::Message = our_msg.parse().context("parsing siwe message")?; let verify_config = VerificationOpts { - domain: Some(our_msg.domain), - nonce: Some(our_msg.nonce), + // domain: Some(our_msg.domain.clone()), + // nonce: Some(our_msg.nonce.clone()), ..Default::default() }; // check the domain and a nonce. let timestamp be automatic - if let Err(e) = their_msg.verify(&their_sig, &verify_config).await { - // message cannot be correctly authenticated - todo!("proper error message: {}", e) - } + our_msg + .verify(&their_sig, &verify_config) + .await + .context("verifying signature")?; let bearer_token = Ulid::new();