Skip to content

Commit 2cddb60

Browse files
committed
Fixes a login issue related to proxy config
Fixes #2551
1 parent 507127f commit 2cddb60

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/client/core/aad/auth-provider.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ export default class AuthProvider {
172172

173173
private async _createClient(tenantId: string):
174174
Promise<PublicClientApplication> {
175-
const proxySettings = await this.app.proxySettings.settings;
176-
const proxyUrl = proxySettings?.http.toString();
175+
const proxyUrl = await this._loadProxyUrl();
176+
177177
if (proxyUrl) {
178178
log.info(`[${tenantId}] Proxying auth endpoints through ` +
179179
proxyUrl);
@@ -197,6 +197,12 @@ export default class AuthProvider {
197197
});
198198
}
199199

200+
private async _loadProxyUrl() {
201+
const proxySettings = await this.app.proxySettings.settings;
202+
const protocolUrl = proxySettings?.https ?? proxySettings?.http;
203+
return protocolUrl?.toString();
204+
}
205+
200206
private async _getAccount(tenantId: string): Promise<AccountInfo> {
201207
if (tenantId in this._accounts) {
202208
return this._accounts[tenantId];

0 commit comments

Comments
 (0)