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

use auth session id for sync when enabled by embedder #180444

Merged
merged 1 commit into from
Apr 20, 2023
Merged
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 @@ -168,9 +168,16 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat

private async initialize(): Promise<void> {
const authenticationSession = await getCurrentAuthenticationSessionInfo(this.credentialsService, this.productService);
if (this.currentSessionId === undefined && this.useWorkbenchSessionId && authenticationSession?.id) {
this.currentSessionId = authenticationSession?.id;
this.useWorkbenchSessionId = !!this.environmentService.options?.settingsSyncOptions?.enabled;
if (this.currentSessionId === undefined && authenticationSession?.id) {
if (this.environmentService.options?.settingsSyncOptions?.authenticationProvider && this.environmentService.options.settingsSyncOptions.enabled) {
this.currentSessionId = authenticationSession?.id;
}

// Backward compatibility
else if (this.useWorkbenchSessionId) {
this.currentSessionId = authenticationSession?.id;
}
this.useWorkbenchSessionId = false;
}

await this.update();
Expand Down