-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(auth): Allow workspace to pre-populate URL for quick sign-in (#6653
) (#6812) This is cherry-picking @mmanela commit from #6653 It was recently reverted here #6794 due to problems with reverting other PRs and merge conflicts. This PR contains a required change for a successful Workspace Auth flow so we should include this in the upcoming 1.64 release ## Original PR description VS Code side part of https://linear.app/sourcegraph/issue/SRC-908/automate-cody-authflow-vs-code After a user creates a workspace we want to make it easy for them to sign-in to the instance in their editor. For enterprise instances today, they need to copy the instance url, go into VS Code and then choose to signin with enterprise instance and then paste the url. This change will help stream-line that flow by allowing the UI in sourcegraph to link to VS Code with a url like `vscode://sourcegraph.cody-ai?instance=someinstance.sourcegraphdev.app` VS Code will handle and either switch to that account if you already are auth'd OR pop-open the signin menu directly ![image](https://github.com/user-attachments/assets/cdab4135-2dae-48d3-945c-2e70187c37f0) Note: For initial version I limited just to workspace domains. But we can generalize that to allow other instance domains. ## Test plan 1. Validate when client doesn't have instance already 2. Validate when client already has instance connected (cherry-picked from commit 9719dc4) --------- Co-authored-by: Matthew Manela <mmanela@users.noreply.github.com>
- Loading branch information
1 parent
153a14e
commit ef65034
Showing
4 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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