Skip to content

Commit

Permalink
reverse cancellation and sequencer (#237029)
Browse files Browse the repository at this point in the history
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 #236825 (comment)
  • Loading branch information
TylerLeonhardt authored Dec 28, 2024
1 parent 0a66dc3 commit 1410d77
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1410d77

Please sign in to comment.