Skip to content

fix(oauth): send a same-origin path as the OAuth return - #1

Merged
emooreatx merged 1 commit into
mainfrom
fix/oauth-same-origin-return
Oct 30, 2026
Merged

emooreatx merged 1 commit into
mainfrom
fix/oauth-same-origin-return

Conversation

@emooreatx

Copy link
Copy Markdown
Contributor

Sign-in on scout.ciris.ai fails for every user with "unsafe redirect_uri: the host is not this origin or loopback". The agent on scoutapilb.ciris.ai accepts only a same-origin path as the OAuth return.

This sends /oauth-complete.html?… (login) and /oauth/<agent>/<provider>/callback (account linking) instead of absolute https://scout.ciris.ai/… URLs. After Google, the agent redirects the browser to that path on scoutapilb.ciris.ai. scoutapilb's nginx then forwards it to scout.ciris.ai with the query, including the one-time ciris_code that oauth-complete.html redeems as before.

Merge after the CIRISManager forward is live on scoutapilb. Until then the path would land on scoutapilb and 404.

tsc --noEmit is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_019ZeGbV8M3kbUSir7VvKGso

The agent refuses an absolute redirect_uri on another origin as an open
redirect, so sign-in from scout.ciris.ai to agents on scoutapilb.ciris.ai
failed for every user. Send the path; scoutapilb's nginx forwards
/oauth-complete.html and /oauth/* back to scout.ciris.ai with the one-time
code. Needs CIRISManager's web_client_origin forward deployed first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ZeGbV8M3kbUSir7VvKGso
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Deploying scoutgui with  Cloudflare Pages  Cloudflare Pages

Latest commit: e74a6ac
Status: ✅  Deploy successful!
Preview URL: https://6836c845.scoutgui.pages.dev
Branch Preview URL: https://fix-oauth-same-origin-return.scoutgui.pages.dev

View logs

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-30T23:27:10.511478Z
We couldn’t complete this review. Comment @codex review to try again.
e74a6ac PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
E Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@emooreatx
emooreatx merged commit 77c4119 into main Oct 30, 2026
5 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants