use email instead of empty name for webauhn (#6733)

* if empty use email instead of name for webauhn

* use email as display name if name is empty
This commit is contained in:
Stefan Melmuk
2026-01-18 15:23:21 +01:00
committed by GitHub
parent b2cd556f3e
commit 25a71d913f
4 changed files with 13 additions and 4 deletions

View File

@@ -266,7 +266,7 @@ async fn _sso_login(
Some((user, _)) if !user.enabled => {
err!(
"This user has been disabled",
format!("IP: {}. Username: {}.", ip.ip, user.name),
format!("IP: {}. Username: {}.", ip.ip, user.display_name()),
ErrorEvent {
event: EventType::UserFailedLogIn
}
@@ -521,7 +521,7 @@ async fn authenticated_response(
result["TwoFactorToken"] = Value::String(token);
}
info!("User {} logged in successfully. IP: {}", &user.name, ip.ip);
info!("User {} logged in successfully. IP: {}", user.display_name(), ip.ip);
Ok(Json(result))
}