FN-5917: fix Codex OAuth option selection

Prevent multi-option OAuth prompts from cancelling Codex browser login.

- add OAuth option selection logic that prefers the browser flow for openai-codex prompts
- fall back to default-labelled or first options for other multi-option OAuth prompts
- add API route coverage for Codex multi-option, single-option, and generic default-labelled prompt handling

Files changed:
 .changeset/fn-5917-codex-oauth-login.md            |  5 ++
 packages/dashboard/src/__tests__/routes-auth.test.ts    | 72 ++++++++++++++++++++++
 packages/dashboard/src/routes/register-auth-routes.ts   | 26 ++++++--
 3 files changed, 97 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-5917

Fusion-Task-Lineage: 3b069280-9dbf-47ee-ae04-b7c54ff14d63
This commit is contained in:
gsxdsm
2026-06-02 18:56:36 -07:00
parent cf23c6f571
commit 3d18872f98
3 changed files with 97 additions and 6 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Fix the dashboard OAuth login flow for ChatGPT Plus/Pro (Codex Subscription) so multi-option provider selection prompts no longer cancel the login before browser auth starts.