From 1410d77f6fdd80ceb2e522449096fc97e821aa01 Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Sat, 28 Dec 2024 03:36:05 -0500 Subject: [PATCH] reverse cancellation and sequencer (#237029) When we cancel, then the promise should be cancelled. If we don't do this, we hang on the first interaction request until we timeout. Fixes the 2nd point in https://github.com/microsoft/vscode/issues/236825#issuecomment-2563882150 --- .../src/node/cachedPublicClientApplication.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/microsoft-authentication/src/node/cachedPublicClientApplication.ts b/extensions/microsoft-authentication/src/node/cachedPublicClientApplication.ts index 0f27c2c0e4d..616b3e1120d 100644 --- a/extensions/microsoft-authentication/src/node/cachedPublicClientApplication.ts +++ b/extensions/microsoft-authentication/src/node/cachedPublicClientApplication.ts @@ -133,11 +133,11 @@ export class CachedPublicClientApplication implements ICachedPublicClientApplica cancellable: true, title: l10n.t('Signing in to Microsoft...') }, - (_process, token) => raceCancellationAndTimeoutError( - this._sequencer.queue(() => this._pca.acquireTokenInteractive(request)), + (_process, token) => this._sequencer.queue(() => raceCancellationAndTimeoutError( + this._pca.acquireTokenInteractive(request), token, 1000 * 60 * 5 - ) + )) ); // this._setupRefresh(result); if (this._isBrokerAvailable) {