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)
| 89 | // It performs an HTTP POST request to the OpenAI token endpoint with the provided |
| 90 | // authorization code and PKCE verifier. |
| 91 | func (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 |
no test coverage detected