diff --git a/bffhd/authentication/mod.rs b/bffhd/authentication/mod.rs index c268a96..0462e1e 100644 --- a/bffhd/authentication/mod.rs +++ b/bffhd/authentication/mod.rs @@ -90,7 +90,7 @@ impl SessionCallback for Callback { let authcid = context .get_ref::() .ok_or(ValidationError::MissingRequiredProperty)?; - if let Some(user) = self.users.get_user(authcid) { + if let Some(user) = self.users.get_user_by_token(authcid) { validate.finalize::(user) } } diff --git a/bffhd/capnp/authenticationsystem.rs b/bffhd/capnp/authenticationsystem.rs index c81f547..5c27922 100644 --- a/bffhd/capnp/authenticationsystem.rs +++ b/bffhd/capnp/authenticationsystem.rs @@ -157,7 +157,8 @@ impl AuthenticationSystem for Authentication { union_field: "challenge", }; } - Err(_) => { + Err(e) => { + tracing::error!(error = %e., "authentication failed"); self.state = State::Aborted; self.build_error(builder);