Duo: use the formatted db email (#4779)

This commit is contained in:
Timshel authored and GitHub committed 2024-07-25 20:25:44 +02:00
1 parent 529c39c6c5
commit f858523d92
2 files changed
+2 -4

No files matched your search

+2 -2
View File
@@ -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(),