Skip to content

Commit fe9e54a

Browse files
committed
Fix GitHub authentication callback
1 parent caa35b8 commit fe9e54a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

ci/dev/vscode.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,21 @@ index 0000000000000000000000000000000000000000..df5b42cba463b6c0043aebbc835f852f
212212
+ util.rimraf("out-vscode-min"),
213213
+ common.minifyTask("out-vscode")
214214
+));
215+
diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts
216+
index aa7dec8e9b4562b47868387d7812711b6321eaa7..c20eef0eeec5cee0cc9ca1e607ac81014253a1c2 100644
217+
--- a/extensions/github-authentication/src/githubServer.ts
218+
+++ b/extensions/github-authentication/src/githubServer.ts
219+
@@ -76,7 +76,9 @@ export class GitHubServer {
220+
this.updateStatusBarItem(true);
221+
222+
const state = uuid();
223+
- const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate`));
224+
+ // NOTE@coder: Remove asExternalUri since that uses the URL serving
225+
+ // code-server which won't match the oauth app's callback URI.
226+
+ const callbackUri = vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate`);
227+
228+
if (this.isTestEnvironment(callbackUri)) {
229+
const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
215230
diff --git a/extensions/postinstall.js b/extensions/postinstall.js
216231
index da4fa3e9d0443d679dfbab1000b434af2ae01afd..50f3e1144f8057883dea8b91ec2f7073458dbd94 100644
217232
--- a/extensions/postinstall.js

0 commit comments

Comments
 (0)