Skip to main content

exchange_code

Function exchange_code 

Source
pub async fn exchange_code(
    code: &str,
    verifier: &str,
) -> Result<CodexCredentials, CodexError>
Expand description

Exchange an authorization code + PKCE verifier for credentials.

ยงErrors

Returns CodexError::Http on transport errors and CodexError::Api if the token endpoint rejects the exchange.