context instead of todo

This commit is contained in:
Bryan Stitt 2022-10-20 07:10:35 +00:00
parent 848eb61349
commit 3f9a20c7a6

View File

@ -194,16 +194,16 @@ pub async fn user_login_post(
let our_msg: siwe::Message = our_msg.parse().context("parsing siwe message")?; let our_msg: siwe::Message = our_msg.parse().context("parsing siwe message")?;
let verify_config = VerificationOpts { let verify_config = VerificationOpts {
domain: Some(our_msg.domain), // domain: Some(our_msg.domain.clone()),
nonce: Some(our_msg.nonce), // nonce: Some(our_msg.nonce.clone()),
..Default::default() ..Default::default()
}; };
// check the domain and a nonce. let timestamp be automatic // check the domain and a nonce. let timestamp be automatic
if let Err(e) = their_msg.verify(&their_sig, &verify_config).await { our_msg
// message cannot be correctly authenticated .verify(&their_sig, &verify_config)
todo!("proper error message: {}", e) .await
} .context("verifying signature")?;
let bearer_token = Ulid::new(); let bearer_token = Ulid::new();