aboutsummaryrefslogtreecommitdiff
path: root/src/api/identity.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/identity.rs')
-rw-r--r--src/api/identity.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/identity.rs b/src/api/identity.rs
index b6621ce3..93ef80bc 100644
--- a/src/api/identity.rs
+++ b/src/api/identity.rs
@@ -524,12 +524,12 @@ async fn twofactor_auth(
match CONFIG.duo_use_iframe() {
true => {
// Legacy iframe prompt flow
- duo::validate_duo_login(data.username.as_ref().unwrap().trim(), twofactor_code, conn).await?
+ duo::validate_duo_login(&user.email, twofactor_code, conn).await?
}
false => {
// OIDC based flow
duo_oidc::validate_duo_login(
- data.username.as_ref().unwrap().trim(),
+ &user.email,
twofactor_code,
data.client_id.as_ref().unwrap(),
data.device_identifier.as_ref().unwrap(),