Expand description
PKCE OAuth login for OpenAI Codex.
Thin wrapper around motosan_ai_oauth with the Codex provider pre-configured.
§Usage
#[tokio::main]
async fn main() -> Result<(), codex_oauth::Error> {
let token = codex_oauth::login().await?;
println!("{}", token.access_token);
Ok(())
}§Notes
- Requires port 1455 to be free on localhost (hardcoded by OpenAI’s app registration).
CLIENT_IDis hardcoded to OpenAI’s public Codex app registration and is not configurable.