Files
lsingh-oai 30c1058df6 Preserve ChatGPT authentication for Gov MCP servers (#54170)
## Why

MCP servers at `https://gov.chatgpt.com` were treated as untrusted for ChatGPT authentication and switched to OAuth, preventing local Gov Apps from retaining the ChatGPT auth provider.

## What changed

Trust the `https://gov.chatgpt.com` origin alongside the existing ChatGPT origin when resolving MCP server authentication. Origin matching preserves scheme, host, and port restrictions.

## Testing

Add regression coverage for Gov Apps URL construction, trusted origin normalization, rejection of lookalike hosts and nonstandard schemes or ports, and retention of the local ChatGPT auth provider. Verify that explicit OAuth servers and servers in remote environments do not receive the host provider.

GitOrigin-RevId: 7ceaf7c524d963005d9f23204489bbde269f0dd5
(cherry picked from commit 160b2b1ef6)
2026-10-15 09:51:20 -07:00
..
…
…