fix(oidc): Check login disable flag for OIDC logins

This commit is contained in:
Ginger committed 2026-12-03 13:48:39 -05:00
1 parent 7c90e4b121
commit 750b067344
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -77,7 +77,7 @@ async fn handle_login(
if services.users.is_login_disabled(&user_id).await {
warn!(%user_id, "user attempted to log in with a login-disabled account");
return Err!(Request(Forbidden("This account is not permitted to log in.")));
return Err!(Request(Forbidden("This account is blocked from logging in.")));
}
services.users.check_password(&user_id, password).await
+6
View File
@@ -185,6 +185,12 @@ async fn route_complete(
.remove::<IgnoredAny>(OIDC_SESSION_ID_KEY)
.await;
if services.users.is_login_disabled(&user_id).await {
return Err(WebError::Forbidden(
"This account is blocked from logging in.".to_owned(),
));
}
let user_session = UserSession { user_id, last_login: SystemTime::now() };
session_store