feat: Implement API-based Codex authentication and add team process API, while removing get_code.go from .gitignore.

This commit is contained in:
2026-02-02 10:28:30 +08:00
parent e8323671b1
commit 71eec01739
3 changed files with 35 additions and 52 deletions

View File

@@ -757,8 +757,8 @@ func processSingleTeam(idx int, req TeamProcessRequest) (result TeamProcessResul
var code string
// 根据全局配置决定授权方式
if config.Global.AuthMethod == "api" {
// 使用纯 API 模式CodexAuth
code, err = auth.CompleteWithCodexAPI(memberChild.Email, memberChild.Password, teamID, req.Proxy, authLogger)
// 使用纯 API 模式CodexAuth- 使用 S2A 生成的授权 URL
code, err = auth.CompleteWithCodexAPI(memberChild.Email, memberChild.Password, teamID, s2aResp.Data.AuthURL, s2aResp.Data.SessionID, req.Proxy, authLogger)
} else if req.BrowserType == "rod" {
code, err = auth.CompleteWithRodLogged(s2aResp.Data.AuthURL, memberChild.Email, memberChild.Password, teamID, req.Headless, req.Proxy, authLogger)
} else {
@@ -857,8 +857,8 @@ func processSingleTeam(idx int, req TeamProcessRequest) (result TeamProcessResul
var code string
// 根据全局配置决定授权方式
if config.Global.AuthMethod == "api" {
// 使用纯 API 模式CodexAuth
code, err = auth.CompleteWithCodexAPI(owner.Email, owner.Password, teamID, req.Proxy, authLogger)
// 使用纯 API 模式CodexAuth- 使用 S2A 生成的授权 URL
code, err = auth.CompleteWithCodexAPI(owner.Email, owner.Password, teamID, s2aResp.Data.AuthURL, s2aResp.Data.SessionID, req.Proxy, authLogger)
} else if req.BrowserType == "rod" {
code, err = auth.CompleteWithRodLogged(s2aResp.Data.AuthURL, owner.Email, owner.Password, teamID, req.Headless, req.Proxy, authLogger)
} else {