feat(loopover): flip PUBLIC_API_ORIGIN to api.loopover.ai - #5618
Merged
Conversation
Closes #4765. Completes the domain flip started in the earlier PUBLIC_SITE_ORIGIN change: this was deliberately deferred pending confirmation that the GitHub OAuth callback URL was updated on GitHub's side, since flipping this changes the redirect_uri sent during login. Confirmed and executed: the classic OAuth App behind GITHUB_OAUTH_CLIENT_ID (used for dashboard web login and the MCP CLI's device-flow login) only supports a single registered callback URL (unlike a GitHub App's up-to-10), so this had to be a hard cutover -- the OAuth App's callback URL was updated directly to https://api.loopover.ai/v1/auth/github/callback on GitHub's side in lockstep with this change. The old gittensory-api.aethereal.dev domain stays live and routed to the same Worker (both routes already present in wrangler.jsonc's routes array from the earlier Step 1 domain-wiring work) and stays in the CORS allowlist -- added it to DEFAULT_CORS_ORIGINS statically, since PUBLIC_API_ORIGIN's dynamic CORS addition now only covers the new domain. No redirect, no sunset date; only which domain this instance treats as canonical for outbound URL construction (redirect_uri, ORB_BROKER_URL default, etc.) has flipped. ## Test plan - [x] Full local gate (`npm run test:ci` + `npm audit --audit-level=moderate`) green. - [x] Fixed the one real assertion depending on the old default: the redirect_uri built during startGitHubWebOAuth in test/unit/auth.test.ts (env.PUBLIC_API_ORIGIN always wins over the requestUrl argument passed to that function, so every other gittensory-api.aethereal.dev mention in that file is arbitrary fixture input, unaffected). - [x] Fixed a CORS preflight test that exercised exactly the static-list gap this PR closes.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5618 +/- ##
=======================================
Coverage 95.01% 95.01%
=======================================
Files 574 574
Lines 45684 45684
Branches 14661 14661
=======================================
Hits 43405 43405
Misses 1528 1528
Partials 751 751
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4765. Completes the domain flip started in the earlier
PUBLIC_SITE_ORIGIN change: this was deliberately deferred pending
confirmation that the GitHub OAuth callback URL was updated on
GitHub's side, since flipping this changes the redirect_uri sent
during login.
Confirmed and executed: the classic OAuth App behind
GITHUB_OAUTH_CLIENT_ID (used for dashboard web login and the MCP
CLI's device-flow login) only supports a single registered callback
URL (unlike a GitHub App's up-to-10), so this had to be a hard
cutover -- the OAuth App's callback URL was updated directly to
https://api.loopover.ai/v1/auth/github/callback on GitHub's side in
lockstep with this change.
The old gittensory-api.aethereal.dev domain stays live and routed to
the same Worker (both routes already present in wrangler.jsonc's
routes array from the earlier Step 1 domain-wiring work) and stays in
the CORS allowlist -- added it to DEFAULT_CORS_ORIGINS statically,
since PUBLIC_API_ORIGIN's dynamic CORS addition now only covers the
new domain. No redirect, no sunset date; only which domain this
instance treats as canonical for outbound URL construction
(redirect_uri, ORB_BROKER_URL default, etc.) has flipped.
Test plan
npm run test:ci+npm audit --audit-level=moderate) green.redirect_uri built during startGitHubWebOAuth in
test/unit/auth.test.ts (env.PUBLIC_API_ORIGIN always wins over the
requestUrl argument passed to that function, so every other
gittensory-api.aethereal.dev mention in that file is arbitrary
fixture input, unaffected).
gap this PR closes.