feat: support github copilot in management ui

This commit is contained in:
clstb
2026-01-17 17:20:55 +01:00
parent 93d7883513
commit b4e070697d
4 changed files with 99 additions and 0 deletions

View File

@@ -227,6 +227,18 @@ func (a *Auth) AccountInfo() (string, string) {
}
}
// For GitHub provider, return username
if strings.ToLower(a.Provider) == "github" {
if a.Metadata != nil {
if username, ok := a.Metadata["username"].(string); ok {
username = strings.TrimSpace(username)
if username != "" {
return "oauth", username
}
}
}
}
// Check metadata for email first (OAuth-style auth)
if a.Metadata != nil {
if v, ok := a.Metadata["email"].(string); ok {