fix: respect GitHub Codespaces port forwarding for OAuth callback URL#82
Draft
fix: respect GitHub Codespaces port forwarding for OAuth callback URL#82
Conversation
…upport Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
|
Copilot
AI
changed the title
[WIP] Fix OAuth redirect issue for Codespaces environment
fix: respect GitHub Codespaces port forwarding for OAuth callback URL
Mar 12, 2026
Contributor
|
View your CI Pipeline Execution ↗ for commit 05de004 ☁️ Nx Cloud last updated this comment at |
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.


OAuth PKCE flow hardcoded
http://localhost:{port}/callbackas the redirect URI, which is unreachable from the browser in GitHub Codespaces — ports must be accessed via the forwarded HTTPS URL.Changes
packages/adt-auth/src/utils/codespaces.ts— newgetCallbackBaseUrl(port)helper that checksCODESPACE_NAME+GITHUB_CODESPACES_PORT_FORWARDING_DOMAINenv vars (auto-injected by Codespaces) and returns the appropriate base URL:packages/adt-auth/src/plugins/service-key.ts— replace hardcodedhttp://localhost:${port}withgetCallbackBaseUrl(port)when constructing the redirect URI passed to XSUAA and the token exchange.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://storage.googleapis.com/prod-north-america/69ab0980542defed8d2aa8f4/cf7cb116-0216-4de5-8a1a-73c9e0bc24ac/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/adt-cli/adt-cli/node_modules/.bin/nx build adt-auth(http block)https://storage.googleapis.com/prod-north-america/69ab0980542defed8d2aa8f4/cf7cb116-0216-4de5-8a1a-73c9e0bc24ac-logs/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/adt-cli/adt-cli/node_modules/.bin/nx build adt-auth(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Created from VS Code.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.