context instead of todo
This commit is contained in:
parent
848eb61349
commit
3f9a20c7a6
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue