feat: Implement API-based Codex authentication and add team process API, while removing get_code.go from .gitignore.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user