Merge branch 'main' into t3

This commit is contained in:
Cytown
2026-03-29 01:25:20 +08:00
70 changed files with 4776 additions and 1868 deletions
+5 -7
View File
@@ -545,13 +545,11 @@ func parseTokenResponse(body []byte, provider string) (*AuthCredential, error) {
AuthMethod: "oauth",
}
if accountID := extractAccountID(tokenResp.IDToken); accountID != "" {
cred.AccountID = accountID
} else if accountID := extractAccountID(tokenResp.AccessToken); accountID != "" {
cred.AccountID = accountID
} else if accountID := extractAccountID(tokenResp.IDToken); accountID != "" {
// Recent OpenAI OAuth responses may only include chatgpt_account_id in id_token claims.
cred.AccountID = accountID
// Recent OpenAI OAuth responses may only include chatgpt_account_id in id_token claims.
if id := extractAccountID(tokenResp.IDToken); id != "" {
cred.AccountID = id
} else if id := extractAccountID(tokenResp.AccessToken); id != "" {
cred.AccountID = id
}
return cred, nil