sort scopes on filter for getSessions in the github auth provider. Fixes https://github.com/github/codespaces/issues/3109

This commit is contained in:
Tyler Leonhardt 2021-06-30 10:15:17 -07:00
parent 5a18461abb
commit 1d1b9961d7
No known key found for this signature in database
GPG key ID: 1BC2B6244363E77E

View file

@ -67,7 +67,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
async getSessions(scopes?: string[]): Promise<vscode.AuthenticationSession[]> {
return scopes
? this._sessions.filter(session => arrayEquals(session.scopes, scopes))
? this._sessions.filter(session => arrayEquals([...session.scopes].sort(), scopes.sort()))
: this._sessions;
}