Skip to content

Commit 151a19f

Browse files
Only add the broker if it's available (microsoft#264785)
We shouldn't have to do this, but let's see if this resolves issues with users who don't have the broker installed.
1 parent 2b3f8c8 commit 151a19f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

extensions/microsoft-authentication/src/node/cachedPublicClientApplication.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export class CachedPublicClientApplication implements ICachedPublicClientApplica
5555
const nativeBrokerPlugin = new NativeBrokerPlugin();
5656
this.isBrokerAvailable = nativeBrokerPlugin.isBrokerAvailable;
5757
this._logger.info(`[${this._clientId}] Native Broker enabled: ${this.isBrokerAvailable}`);
58-
broker = { nativeBrokerPlugin };
58+
if (this.isBrokerAvailable) {
59+
broker = { nativeBrokerPlugin };
60+
}
5961
} else {
6062
this._logger.info(`[${this._clientId}] Native Broker disabled via settings`);
6163
}

0 commit comments

Comments
 (0)