From 427361fac917cf5e646d190b2de83e5379707870 Mon Sep 17 00:00:00 2001 From: JhontSouth Date: Wed, 24 Jul 2024 10:20:41 -0500 Subject: [PATCH 1/2] avoid undefined errors with msal-node --- .../botframework-connector/src/auth/msalAppCredentials.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/botframework-connector/src/auth/msalAppCredentials.ts b/libraries/botframework-connector/src/auth/msalAppCredentials.ts index 4792a8c42d..d674c4bbe3 100644 --- a/libraries/botframework-connector/src/auth/msalAppCredentials.ts +++ b/libraries/botframework-connector/src/auth/msalAppCredentials.ts @@ -70,8 +70,8 @@ export class MsalAppCredentials extends AppCredentials { typeof maybeClientApplicationOrAppId === 'string' ? maybeClientApplicationOrAppId : typeof maybeAppIdOrAppPasswordOrCertificate === 'string' - ? maybeAppIdOrAppPasswordOrCertificate - : undefined; + ? maybeAppIdOrAppPasswordOrCertificate + : undefined; super(appId, undefined, maybeScope); @@ -91,7 +91,7 @@ export class MsalAppCredentials extends AppCredentials { auth.clientSecret = typeof maybeAppIdOrAppPasswordOrCertificate === 'string' ? maybeAppIdOrAppPasswordOrCertificate - : undefined; + : ""; this.clientApplication = new ConfidentialClientApplication({ auth }); } From 46bfa443b717cebbb47399059386f8b2fbe84406 Mon Sep 17 00:00:00 2001 From: JhontSouth Date: Wed, 24 Jul 2024 11:10:41 -0500 Subject: [PATCH 2/2] fix lint issue --- .../botframework-connector/src/auth/msalAppCredentials.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libraries/botframework-connector/src/auth/msalAppCredentials.ts b/libraries/botframework-connector/src/auth/msalAppCredentials.ts index d674c4bbe3..daed8ad0ff 100644 --- a/libraries/botframework-connector/src/auth/msalAppCredentials.ts +++ b/libraries/botframework-connector/src/auth/msalAppCredentials.ts @@ -70,8 +70,8 @@ export class MsalAppCredentials extends AppCredentials { typeof maybeClientApplicationOrAppId === 'string' ? maybeClientApplicationOrAppId : typeof maybeAppIdOrAppPasswordOrCertificate === 'string' - ? maybeAppIdOrAppPasswordOrCertificate - : undefined; + ? maybeAppIdOrAppPasswordOrCertificate + : undefined; super(appId, undefined, maybeScope); @@ -89,9 +89,7 @@ export class MsalAppCredentials extends AppCredentials { : undefined; auth.clientSecret = - typeof maybeAppIdOrAppPasswordOrCertificate === 'string' - ? maybeAppIdOrAppPasswordOrCertificate - : ""; + typeof maybeAppIdOrAppPasswordOrCertificate === 'string' ? maybeAppIdOrAppPasswordOrCertificate : ''; this.clientApplication = new ConfidentialClientApplication({ auth }); }