From b702aad4fe579599d5b45b694b9cb655a3f7daec Mon Sep 17 00:00:00 2001 From: Matthew Podwysocki Date: Fri, 10 Jun 2022 16:15:33 -0400 Subject: [PATCH] Fixes to spawn a new instance on macOS --- sdk/identity/identity/src/msal/nodeFlows/msalOpenBrowser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/identity/identity/src/msal/nodeFlows/msalOpenBrowser.ts b/sdk/identity/identity/src/msal/nodeFlows/msalOpenBrowser.ts index 7c735ac8c93f..ae8ea43d1124 100644 --- a/sdk/identity/identity/src/msal/nodeFlows/msalOpenBrowser.ts +++ b/sdk/identity/identity/src/msal/nodeFlows/msalOpenBrowser.ts @@ -244,7 +244,8 @@ export class MsalOpenBrowser extends MsalNode { const response = await this.publicApp!.getAuthCodeUrl(authCodeUrlParameters); try { - await interactiveBrowserMockable.open(response, { wait: true }); + // A new instance on macOS only which allows it to not hang + await interactiveBrowserMockable.open(response, { wait: true, newInstance: true }); } catch (e: any) { throw new CredentialUnavailableError( `InteractiveBrowserCredential: Could not open a browser window. Error: ${e.message}`