jaredhanson / passport-oauth2

OAuth 2.0 authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-oauth2/?utm_source=github&utm_medium=referral&utm_campaign=passport-oauth2&utm_content=about
MIT License
607 stars 343 forks source link

--pending-deprecation DeprecationWarning: `url.parse()` #181

Open CodeIter opened 10 months ago

CodeIter commented 10 months ago

Hi, I found a pending deprecation hier:

https://github.com/jaredhanson/passport-oauth2/blob/ea9e99adda82dff67502654347589866fea80eb2/lib/strategy.js#L103

I used This NODE_OPTIONS:

NODE_OPTIONS="--pending-deprecation --throw-deprecation --trace-deprecation"

Output:

+ node server.mjs
node:internal/process/warning:162
        throw warning;
        ^

DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
    at Object.urlParse [as parse] (node:url:154:13)
    at Strategy.OAuth2Strategy (.../myproject/node_modules/.pnpm/passport-oauth2@1.7.0/node_modules/passport-oauth2/lib/strategy.js:103:54)
    at new Strategy (.../myproject/node_modules/.pnpm/passport-facebook@3.0.0/node_modules/passport-facebook/lib/strategy.js:56:18)
    at file://.../myproject/src/auth/strategy/facebook.mjs:7:33
    at ModuleJob.run (node:internal/modules/esm/module_job:192:25) {
  code: 'DEP0169'
}

Node.js v20.2.0

Fail : Code status 1