mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-27 13:16:59 +00:00
No longer look at sessions[0] (#231063)
We don't need to do this anymore now that account preference is kept across sessions.
This commit is contained in:
committed by
GitHub
parent
5b70c16e0b
commit
6d482e38cd
@@ -332,11 +332,8 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
|
||||
});
|
||||
|
||||
const sessions = await this._sessionsPromise;
|
||||
|
||||
// First we use the account specified in the options, otherwise we use the first account we have to seed auth.
|
||||
const loginWith = options?.account?.label ?? sessions[0]?.account.label;
|
||||
const loginWith = options?.account?.label;
|
||||
this._logger.info(`Logging in with '${loginWith ? loginWith : 'any'}' account...`);
|
||||
|
||||
const scopeString = sortedScopes.join(' ');
|
||||
const token = await this._githubServer.login(scopeString, loginWith);
|
||||
const session = await this.tokenToSession(token, scopes);
|
||||
|
||||
Reference in New Issue
Block a user