@@ -4,6 +4,7 @@ import * as vscode from "vscode";
4
4
import { setupStatusBar } from "./statusbar/status" ;
5
5
import { registerAllCommands } from "./commands" ;
6
6
import { activateLspClient , deactivateLspClient } from "./lsp/client" ;
7
+ import { showPanel } from "./commands/showPanel" ;
7
8
8
9
// This method is called when your extension is activated
9
10
// Your extension is activated the very first time the command is executed
@@ -16,12 +17,17 @@ export function activate(context: vscode.ExtensionContext) {
16
17
vscode . window . registerUriHandler ( {
17
18
handleUri ( uri : vscode . Uri ) {
18
19
const searchParams = new URLSearchParams ( uri . query ) ;
19
- const accessToken = searchParams . get ( "access_token " ) ;
20
- vscode . window . showInformationMessage ( `Access : ${ accessToken } ` ) ;
21
- const refreshToken = searchParams . get ( "refresh_token " ) ;
22
- vscode . window . showInformationMessage ( `Refresh : ${ refreshToken } ` ) ;
20
+ const code = searchParams . get ( "code " ) ;
21
+ vscode . window . showInformationMessage ( `Code : ${ code } ` ) ;
22
+ const provider = searchParams . get ( "provider " ) ;
23
+ vscode . window . showInformationMessage ( `Provider : ${ provider } ` ) ;
23
24
24
- context . globalState . update ( "token" , { accessToken, refreshToken } ) ;
25
+ // context.globalState.update("token", {
26
+ // accessToken: code,
27
+ // refreshToken: provider,
28
+ // });
29
+ const url = `http://localhost:4000/v2/auth/exchange/?code=${ code } &provider=${ provider } ` ;
30
+ showPanel ( context , url ) ;
25
31
} ,
26
32
} ) ;
27
33
}
0 commit comments