MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / ExchangeCodeForTokens

Method ExchangeCodeForTokens

internal/auth/codex/openai_auth.go:91–93  ·  view source on GitHub ↗

ExchangeCodeForTokens exchanges an authorization code for access and refresh tokens. It performs an HTTP POST request to the OpenAI token endpoint with the provided authorization code and PKCE verifier.

(ctx context.Context, code string, pkceCodes *PKCECodes)

Source from the content-addressed store, hash-verified

89// It performs an HTTP POST request to the OpenAI token endpoint with the provided
90// authorization code and PKCE verifier.
91func (o *CodexAuth) ExchangeCodeForTokens(ctx context.Context, code string, pkceCodes *PKCECodes) (*CodexAuthBundle, error) {
92 return o.ExchangeCodeForTokensWithRedirect(ctx, code, RedirectURI, pkceCodes)
93}
94
95// ExchangeCodeForTokensWithRedirect exchanges an authorization code for tokens using
96// a caller-provided redirect URI. This supports alternate auth flows such as device

Callers 1

LoginMethod · 0.95

Tested by

no test coverage detected