From 5847be2aa79f04201e8fd3f66081a36ceb7fbefe Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Fri, 27 Dec 2024 23:35:21 -0500 Subject: [PATCH] reverse cancellation and sequencer 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 0f27c2c0e4d62..616b3e1120d56 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) {