From 2cddb60fd2d6d8192a7a5ac402de0be28a1032d6 Mon Sep 17 00:00:00 2001 From: Shiran Pasternak Date: Thu, 28 Jul 2022 17:29:33 -0400 Subject: [PATCH 1/2] Fixes a login issue related to proxy config Fixes #2551 --- src/client/core/aad/auth-provider.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/client/core/aad/auth-provider.ts b/src/client/core/aad/auth-provider.ts index 8581f2a9f0..42181b655c 100644 --- a/src/client/core/aad/auth-provider.ts +++ b/src/client/core/aad/auth-provider.ts @@ -172,8 +172,8 @@ export default class AuthProvider { private async _createClient(tenantId: string): Promise { - const proxySettings = await this.app.proxySettings.settings; - const proxyUrl = proxySettings?.http.toString(); + const proxyUrl = await this._loadProxyUrl(); + if (proxyUrl) { log.info(`[${tenantId}] Proxying auth endpoints through ` + proxyUrl); @@ -197,6 +197,12 @@ export default class AuthProvider { }); } + private async _loadProxyUrl() { + const proxySettings = await this.app.proxySettings.settings; + const protocolUrl = proxySettings?.https ?? proxySettings?.http; + return protocolUrl?.toString(); + } + private async _getAccount(tenantId: string): Promise { if (tenantId in this._accounts) { return this._accounts[tenantId]; From 43565df2fb24b674a2b3c9bef079fcdca2efae9c Mon Sep 17 00:00:00 2001 From: Shiran Pasternak Date: Mon, 1 Aug 2022 12:56:12 -0400 Subject: [PATCH 2/2] Bumps Batch Explorer to v2.14.2 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74fd9ce109..6b07150bfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 2.14.2 + +### Bugs + +* Fixes login failures when proxy is misconfigured [\#2551] + # 2.14.1 ### Bugs diff --git a/package.json b/package.json index b5c85ce45d..e589e7b0fa 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "name": "Microsoft Corporation", "email": "batchexplorer@microsoft.com" }, - "version": "2.14.1", + "version": "2.14.2", "main": "build/client/main.prod.js", "scripts": { "ts": "ts-node --project tsconfig.node.json --files",