mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
Add opt-in OAuth discovery to config server loaders (#62432)
## What changed Allow config server bundle and auth loaders to discover authorization and token endpoints, plus an optional device authorization endpoint, from OAuth metadata when callers enable discovery and omit `config_server.oauth`. Discovery uses the bootstrap HTTP policy, times out after five seconds, and keeps the discovered settings in memory. Existing managed-config entry points pass `ConfigServerDiscovery::Disabled`. If bundle loader initialization fails, report the error on the first read and retry on later reads until a loader and its refresh worker can start. ## Testing Add tests for endpoint parsing and defaults, the discovery timeout, explicit OAuth precedence, disabled discovery, and local network policy. GitOrigin-RevId: 7cb72054147ec34f985d55dfe708fccfafcb4ba3
This commit is contained in:
@@ -585,7 +585,9 @@ async fn logout_config_server(config: &Config) -> std::io::Result<bool> {
|
||||
match codex_cloud_config::managed_config_auth_manager(
|
||||
config.auth_config(),
|
||||
config.config_layer_stack.requirements_toml(),
|
||||
)? {
|
||||
)
|
||||
.await?
|
||||
{
|
||||
Some(manager) => manager.logout().await,
|
||||
None => Ok(false),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user