mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-13 15:35:20 +01:00
don't sort scope list. Fixes Microsoft/vscode-pull-request-github#2751
This commit is contained in:
@@ -198,7 +198,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
|
||||
*/
|
||||
this.telemetryReporter?.sendTelemetryEvent('login');
|
||||
|
||||
const token = await this._githubServer.login(scopes.sort().join(' '));
|
||||
const token = await this._githubServer.login(scopes.join(' '));
|
||||
this.afterTokenLoad(token);
|
||||
const session = await this.tokenToSession(token, scopes);
|
||||
await this.setToken(session);
|
||||
|
||||
@@ -338,7 +338,7 @@ export class AuthenticationService extends Disposable implements IAuthentication
|
||||
}
|
||||
|
||||
Object.keys(existingRequestsForProvider).forEach(requestedScopes => {
|
||||
if (addedSessions.some(session => session.scopes.slice().sort().join('') === requestedScopes)) {
|
||||
if (addedSessions.some(session => session.scopes.slice().join('') === requestedScopes)) {
|
||||
const sessionRequest = existingRequestsForProvider[requestedScopes];
|
||||
sessionRequest?.disposables.forEach(item => item.dispose());
|
||||
|
||||
@@ -604,7 +604,7 @@ export class AuthenticationService extends Disposable implements IAuthentication
|
||||
|
||||
if (provider) {
|
||||
const providerRequests = this._signInRequestItems.get(providerId);
|
||||
const scopesList = scopes.sort().join('');
|
||||
const scopesList = scopes.join('');
|
||||
const extensionHasExistingRequest = providerRequests
|
||||
&& providerRequests[scopesList]
|
||||
&& providerRequests[scopesList].requestingExtensionIds.includes(extensionId);
|
||||
|
||||
Reference in New Issue
Block a user