Skip to content

Commit 5d53854

Browse files
authored
allow setting auth host in nodeCommon via envVars (Azure#15694)
* use AZURE AUTHORITY HOST envVar in nodeCommon * formatting
1 parent c035667 commit 5d53854

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sdk/identity/identity/src/msal/nodeFlows/nodeCommon.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ export abstract class MsalNode extends MsalBaseUtilities implements MsalFlow {
5858
protected defaultNodeMsalConfig(options: MsalNodeOptions): msalNode.Configuration {
5959
const clientId = options.clientId || DeveloperSignOnClientId;
6060
const tenantId = resolveTenantId(options.logger, options.tenantId, options.clientId);
61-
const authorityHost = getAuthorityHost(tenantId, options.authorityHost);
61+
const authorityHost = getAuthorityHost(
62+
tenantId,
63+
options.authorityHost || process.env.AZURE_AUTHORITY_HOST
64+
);
6265
this.identityClient = new IdentityClient({
6366
...options.tokenCredentialOptions,
6467
authorityHost

0 commit comments

Comments
 (0)