Skip to content

Commit 756791f

Browse files
authored
Use StorageScope.Application for edit session auth preference (microsoft#152798)
1 parent 427d4a5 commit 756791f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/workbench/services/sessionSync/browser/sessionSyncWorkbenchService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,14 +265,14 @@ export class SessionSyncWorkbenchService extends Disposable implements ISessionS
265265
}
266266

267267
private get existingSessionId() {
268-
return this.storageService.get(SessionSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, StorageScope.PROFILE);
268+
return this.storageService.get(SessionSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, StorageScope.APPLICATION);
269269
}
270270

271271
private set existingSessionId(sessionId: string | undefined) {
272272
if (sessionId === undefined) {
273-
this.storageService.remove(SessionSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, StorageScope.PROFILE);
273+
this.storageService.remove(SessionSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, StorageScope.APPLICATION);
274274
} else {
275-
this.storageService.store(SessionSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, sessionId, StorageScope.PROFILE, StorageTarget.USER);
275+
this.storageService.store(SessionSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY, sessionId, StorageScope.APPLICATION, StorageTarget.USER);
276276
}
277277
}
278278

@@ -283,7 +283,7 @@ export class SessionSyncWorkbenchService extends Disposable implements ISessionS
283283

284284
private async onDidChangeStorage(e: IStorageValueChangeEvent): Promise<void> {
285285
if (e.key === SessionSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY
286-
&& e.scope === StorageScope.PROFILE
286+
&& e.scope === StorageScope.APPLICATION
287287
&& this.#authenticationInfo?.sessionId !== this.existingSessionId
288288
) {
289289
this.#authenticationInfo = undefined;

0 commit comments

Comments
 (0)