mirror of
https://github.com/openai/codex.git
synced 2026-11-18 07:00:27 +00:00
Support per-server MCP OAuth callback ports (#38448)
## What changed - Add `oauth.callback_port` to MCP server configuration and preserve it when serializing configuration edits. - Accept `oauth.callbackPort` from plugin MCP declarations and skill dependency metadata. - Prefer the server-specific callback port over `mcp_oauth_callback_port` for CLI login, app-server, plugin installation, executor, and skill dependency OAuth flows. ## Testing - Cover configuration parsing, serialization, and fallback behavior. - Verify plugin, executor, and skill OAuth registrations use their configured callback ports instead of the global port. GitOrigin-RevId: 7f65e5e7869358307e49779f1b75e8672b607736
This commit is contained in:
1 parent
ca83f7908c
commit
1da59ad257
22 files changed
+205
-37
No files matched your search
@@ -429,6 +429,7 @@ async fn run_add(config_overrides: &CliConfigOverrides, add_args: AddArgs) -> Re
|
||||
.clone()
|
||||
.map(|client_id| McpServerOAuthConfig {
|
||||
client_id: Some(client_id),
|
||||
callback_port: None,
|
||||
}),
|
||||
oauth_resource: oauth_resource.clone(),
|
||||
tools: HashMap::new(),
|
||||
@@ -593,7 +594,7 @@ async fn run_login(config: &Config, login_args: LoginArgs) -> Result<()> {
|
||||
server.oauth_client_id(),
|
||||
client_registration,
|
||||
server.oauth_resource.as_deref(),
|
||||
config.mcp_oauth_callback_port,
|
||||
server.oauth_callback_port(config.mcp_oauth_callback_port),
|
||||
config.mcp_oauth_callback_url.as_deref(),
|
||||
http_client,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user