vsce fix: remove credentials from graphQL & update endpoint
Created by: abeatrix
Close: https://github.com/sourcegraph/sourcegraph/issues/35955 & https://github.com/sourcegraph/sourcegraph/issues/35980
Issue 1 - integration test is failing
Issue summary: https://github.com/sourcegraph/sourcegraph/issues/35955
Summary
The integration test is currently failing for VSCE because of CORS issue caused by credentials: include
It was a leftover by mistake from my last PR when testing the streamlined auth flow.
Solution
Removing it has resolved the issue:
Issue 2 - auth failed in UI
Issue summary: https://github.com/sourcegraph/sourcegraph/issues/35980
Summary
User is unable to login if they have submitted a new instance URL in the UI while the extension has already connected to the old instance URL (we use sourcegraph.com by default). This is because updating instance URL via the UI does not trigger extension to reload currently because we only update the instance URL in the User config if the auth call is completed successfully (code), and the reload will only be triggered if the instance URL has been changed in the config.
Solution
Update access tplem them instance URL in config after the form has been submitted to trigger extension to reload (code)
Test plan
The test build from this branch is now passing the integration test.
Run yarn build:test
and then yarn test-integration
in the client/vscode
directory to run the integration test.
App preview:
Check out the client app preview documentation to learn more.