mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
use auth session id for sync when enabled by embedder (#180444)
This commit is contained in:
parent
cedf1eaa25
commit
155d71f27d
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue