Skip to content

Commit 7808e42

Browse files
committed
Refactor session consent logic to streamline trusted extension handling
1 parent ad6cf56 commit 7808e42

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/vs/workbench/api/browser/mainThreadAuthentication.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -439,14 +439,9 @@ export class MainThreadAuthentication extends Disposable implements MainThreadAu
439439
// We only want to show the "recreating session" prompt if we are using forceNewSession & there are sessions
440440
// that we will be "forcing through".
441441
const recreatingSession = !!(options.forceNewSession && sessions.length);
442-
443-
// Skip the consent prompt for extensions that are trusted via product configuration
444-
const isTrusted = this.authenticationAccessService.isAccessAllowed(providerId, '', extensionId) === true;
445-
if (!isTrusted) {
446-
const isAllowed = await this.loginPrompt(provider, extensionName, recreatingSession, uiOptions);
447-
if (!isAllowed) {
448-
throw new Error('User did not consent to login.');
449-
}
442+
const isAllowed = await this.loginPrompt(provider, extensionName, recreatingSession, uiOptions);
443+
if (!isAllowed) {
444+
throw new Error('User did not consent to login.');
450445
}
451446

452447
let session: AuthenticationSession;

0 commit comments

Comments
 (0)