Skip to content

Commit e6a60c3

Browse files
authored
Use idToken for edit sessions (microsoft#154534)
1 parent c5a9280 commit e6a60c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/editSessions/browser/editSessionsWorkbenchService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
160160
const existing = await this.getExistingSession();
161161
if (existing !== undefined) {
162162
this.logService.trace(`Found existing authentication session with ID ${existingSessionId}`);
163-
this.#authenticationInfo = { sessionId: existing.session.id, token: existing.session.accessToken, providerId: existing.session.providerId };
163+
this.#authenticationInfo = { sessionId: existing.session.id, token: existing.session.idToken ?? existing.session.accessToken, providerId: existing.session.providerId };
164164
this.storeClient.setAuthToken(this.#authenticationInfo.token, this.#authenticationInfo.providerId);
165165
return true;
166166
}
@@ -169,7 +169,7 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
169169
// Ask the user to pick a preferred account
170170
const session = await this.getAccountPreference();
171171
if (session !== undefined) {
172-
this.#authenticationInfo = { sessionId: session.id, token: session.accessToken, providerId: session.providerId };
172+
this.#authenticationInfo = { sessionId: session.id, token: session.idToken ?? session.accessToken, providerId: session.providerId };
173173
this.storeClient.setAuthToken(this.#authenticationInfo.token, this.#authenticationInfo.providerId);
174174
this.existingSessionId = session.id;
175175
this.logService.trace(`Saving authentication session preference for ID ${session.id}.`);

0 commit comments

Comments
 (0)