mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
Bug fix: check account id not session id (#206990)
This should be checking the account id not the session id... otherwise the user will get a modal every time they go through the login flow.
This commit is contained in:
parent
b37060a43a
commit
cd6bd0a01a
|
@ -304,11 +304,11 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
|
|||
const session = await this.tokenToSession(token, scopes);
|
||||
this.afterSessionLoad(session);
|
||||
|
||||
if (sessions.some(s => s.id !== session.id)) {
|
||||
if (sessions.some(s => s.account.id !== session.account.id)) {
|
||||
const otherAccountsIndexes = new Array<number>();
|
||||
const otherAccountsLabels = new Set<string>();
|
||||
for (let i = 0; i < sessions.length; i++) {
|
||||
if (sessions[i].id !== session.id) {
|
||||
if (sessions[i].account.id !== session.account.id) {
|
||||
otherAccountsIndexes.push(i);
|
||||
otherAccountsLabels.add(sessions[i].account.label);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue