-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(vscode): support insiders login #6836
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
Conversation
packages/app/package.json
Outdated
| "posthtml-parser": "^0.4.1", | ||
| "posthtml-render": "^1.1.0", | ||
| "prism-react-renderer": "^1.0.2", | ||
| "protocol-handlers": "^0.1.2", |
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.
Using the same library we use in V2 to detect protocol handlers that don't have any registered apps in the system.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a3defc1:
|
|
The |
|
Build for latest commit a3defc1 is at https://pr6836.build.csb.dev/s/new. |
a415db9 to
f3665ba
Compare
| autoWidth | ||
| href={deepLink} | ||
| style={{ fontSize: 16, height: 40, width: '100%', marginTop: '1rem' }} | ||
| onClick={openInVsCode} |
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.
Converting this link to a button because if we navigate to vscode-insiders:// from a link we cannot catch the exception that happens when the protocol handler is not registered. We use the openUrl from protocol-handlers to check for that, so we need an onClick.
|
Adding support for conditional sign in urls from the extension's side in https://github.com/codesandbox/codesandbox-applications/pull/1974. |
What kind of change does this PR introduce?
This is a new feature, a follow-up to the VS Code Insiders support in CodeSandbox Projects.
What is the current behavior?
Currently, when going through the VS Code login flow from the VS Code Insiders, the callback URI is always hardcoded on the V1's side to be
vscode://. This will open the regular VS Code app and not the insiders app that has initiated the login.What is the new behavior?
insidersquery parameter present in thevscode/loginURL;useEffectto set thedeepLinkon the link.vscode-insiders://callback URI.What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated.
Screenshots
Testing that clicking the button actually leads to Insiders if installed:
vscode-ins.mov
Checklist