Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send access token instead of id token #229099

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
const existingSession = await this.getExistingSession();
if (existingSession) {
this.logService.info(`Found existing authentication session with ID ${existingSession.session.id}`);
return { sessionId: existingSession.session.id, token: existingSession.session.idToken ?? existingSession.session.accessToken, providerId: existingSession.session.providerId };
return { sessionId: existingSession.session.id, token: existingSession.session.accessToken, providerId: existingSession.session.providerId };
} else {
this._didSignOut.fire();
}
Expand All @@ -296,7 +296,7 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
const authenticationSession = await this.getAccountPreference(reason);
if (authenticationSession !== undefined) {
this.existingSessionId = authenticationSession.id;
return { sessionId: authenticationSession.id, token: authenticationSession.idToken ?? authenticationSession.accessToken, providerId: authenticationSession.providerId };
return { sessionId: authenticationSession.id, token: authenticationSession.accessToken, providerId: authenticationSession.providerId };
}

return undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class UserDataSyncAccount implements IUserDataSyncAccount {
get sessionId(): string { return this.session.id; }
get accountName(): string { return this.session.account.label; }
get accountId(): string { return this.session.account.id; }
get token(): string { return this.session.idToken || this.session.accessToken; }
get token(): string { return this.session.accessToken; }
}

type MergeEditorInput = { base: URI; input1: { uri: URI }; input2: { uri: URI }; result: URI };
Expand Down
Loading