mirror of
https://github.com/Microsoft/vscode
synced 2024-10-06 03:17:00 +00:00
don't sort scope list. Fixes Microsoft/vscode-pull-request-github#2751
This commit is contained in:
parent
c1448f3161
commit
e0c8a76b7a
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue