Skip to content

Commit 453ddc2

Browse files
authored
Use AuthenticationSession.account.id to dedupe sessions (microsoft#152774)
`AuthenticationSession.account.label` is not guaranteed to be unique
1 parent d6e60d3 commit 453ddc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,15 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
211211
const sessions = await this.authenticationService.getSessions(authenticationProviderId, scopes) || [];
212212
for (const session of sessions) {
213213
const account: UserDataSyncAccount = new UserDataSyncAccount(authenticationProviderId, session);
214-
accounts.set(account.accountName, account);
214+
accounts.set(account.accountId, account);
215215
if (this.isCurrentAccount(account)) {
216216
currentAccount = account;
217217
}
218218
}
219219

220220
if (currentAccount) {
221221
// Always use current account if available
222-
accounts.set(currentAccount.accountName, currentAccount);
222+
accounts.set(currentAccount.accountId, currentAccount);
223223
}
224224

225225
return [...accounts.values()];

0 commit comments

Comments
 (0)