fix(auth): support employee ID usernames
giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s

Assisted-by: Codex:GPT-5
This commit is contained in:
2026-08-29 18:42:44 +08:00
parent 746b23b098
commit ab55a432ec
6 changed files with 33 additions and 2 deletions
+2
View File
@@ -160,6 +160,8 @@ func SignInOAuthCallback(ctx *context.Context) {
missingFields = append(missingFields, "nickname")
case setting.OAuth2UsernamePreferredUsername:
missingFields = append(missingFields, "preferred_username")
case setting.OAuth2UsernameEmployeeID:
missingFields = append(missingFields, "employee_id")
} // else: "UserID" and "Email" have been handled above separately
}
if len(missingFields) > 0 {