Skip to content

Commit d76a8c2

Browse files
Even more logging (#249689)
1 parent cd8617e commit d76a8c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/api/common/extHostAuthentication.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,11 @@ export class DynamicAuthProvider implements vscode.AuthenticationProvider {
385385
}
386386

387387
// Prepare the authorization request URL
388+
const scopeString = scopes.join(' ');
388389
const authorizationUrl = new URL(this._serverMetadata.authorization_endpoint!);
389390
authorizationUrl.searchParams.append('client_id', this.clientId);
390391
authorizationUrl.searchParams.append('response_type', 'code');
391-
authorizationUrl.searchParams.append('scope', scopes.join(' '));
392+
authorizationUrl.searchParams.append('scope', scopeString);
392393
authorizationUrl.searchParams.append('state', state.toString());
393394
authorizationUrl.searchParams.append('code_challenge', codeChallenge);
394395
authorizationUrl.searchParams.append('code_challenge_method', 'S256');
@@ -400,10 +401,13 @@ export class DynamicAuthProvider implements vscode.AuthenticationProvider {
400401
const promise = this.waitForAuthorizationCode(callbackUri);
401402

402403
// Open the browser for user authorization
404+
this._logger.info(`Opening authorization URL for scopes: ${scopeString}`);
405+
this._logger.trace(`Authorization URL: ${authorizationUrl.toString()}`);
403406
await this._extHostWindow.openUri(authorizationUrl.toString(), {});
404407

405408
// Wait for the authorization code via a redirect
406409
const { code } = await promise;
410+
this._logger.info(`Authorization code received for scopes: ${scopeString}`);
407411

408412
if (!code) {
409413
throw new Error('Authentication failed: No authorization code received');

0 commit comments

Comments
 (0)