Merge remote-tracking branch 'upstream/main'

This commit is contained in:
781456868@qq.com
2026-01-19 20:09:17 +08:00
37 changed files with 3399 additions and 1242 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 {