-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat(oauth): use asExternalUrl to get the correct callback #7651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
} | ||
|
||
get redirectUrl() { | ||
return `http://localhost:${PORT}`; // TODO: this has to be a hub url or should we spin up a server? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main thing I'm addressing in this PR. I don't fully understand the question about hub URLs; should I leave a comment behind somewhere like there was before?
b54ed5c
to
ada6cdd
Compare
@JonZeolla the files changed appears to be in an odd state where it's showing a bunch of extraneous added spaces, formatting changes, etc. Could you take a look and whittle down to only the relevant changes? |
@RomneyDa that came from prettier, following the contributing guide. I can undo it though |
@RomneyDa cleanup done |
Description
This replaces the hardcoded localhost from #6800 with using
asExternalUrl
to support configuration in more complex environmentsAI Code Review
@continue-general-review
or@continue-detailed-review
Checklist
Screen recording or screenshot
asExternalUrl.mov
Tests
Updated
core/context/mcp/MCPOauth.vitest.ts
to ensure use ofgetExternalUri
when available, and fallback to the oldlocalhost:3000
when it isn't, and some (limited) concurrency tests.Summary by cubic
Switch OAuth redirects to use IDE external URLs (VS Code asExternalUri) instead of hardcoded localhost, so callbacks work in local, remote, and web environments. Adds state-based concurrency and safer server handling.
New Features
Bug Fixes