AzureAD / passport-azure-ad

The code for Passport Azure AD has been moved to the MSAL.js repo. Please open any issues or PRs at the link below.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/maintenance/passport-azure-ad
Other
420 stars 177 forks source link

Upgrade http-proxy-agent dependency if possible #545

Closed filipgerat closed 3 years ago

filipgerat commented 3 years ago

Version: 4.3.0

When using this package together with https://github.com/MONEI/Shopify-api-node, the shopify package stops working. This is caused by an outdated dependency agent-base. For reference please check: https://github.com/MONEI/Shopify-api-node/issues/385

passport-azure-ad depends on http-proxy-agent version ^2.2.2 which is quite outdated -- the current version is 4.0.1 and depends on agent-base version 6, which would solve the problem.

Is it possible to upgrade this dependency within your package?

Current workaround for this issue

import * as https from 'https';
const request = https.request;
import { BearerStrategy } from 'passport-azure-ad';
// @ts-ignore
https.request = request;
drmanhatin commented 3 years ago

Lovely, I ran into the same problem this morning. Thanks for the patch Filip!

Getting this error though: [ERROR] 14:55:22 TypeError: Cannot set property request of # which has only a getter on https.request = request

filipgerat commented 3 years ago

Lovely, I ran into the same problem this morning. Thanks for the patch Filip!

Getting this error though: [ERROR] 14:55:22 TypeError: Cannot set property request of # which has only a getter on https.request = request

Yeah, it's not really a patch though, but a workaround. The error is from the TypeScript linter, -- that's why the // @ts-ignore

drmanhatin commented 3 years ago

Change import to import https from 'https'; and you wont get the error!

tnorling commented 3 years ago

This library is currently in maintenance phase and we are taking only critical security bugs.

We are currently in the design phase of a new version of this library, which can be tracked here. The timeline for the new library will be uploaded to our msal js repo roadmap as soon as it becomes known. We will certainly make sure that the new version uses the most up to date dependencies.

Seeing as how a workaround is available, closing for now but please feel free to open an issue on the MSAL.js repo if you have further questions or concerns. Thanks!