Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oidc discovery well-known #80

Open
salleman33 opened this issue May 6, 2020 · 2 comments
Open

oidc discovery well-known #80

salleman33 opened this issue May 6, 2020 · 2 comments

Comments

@salleman33
Copy link

Hi,
I looked to configure oidc auth with discovery/dynamic config.
I have the URL https://xxxxx/sp/.well-known/openid-configuration for that.

Here is my test :

const OidcStrategy = require('passport-openidconnect').Strategy;
passport.use('oidc', new OidcStrategy({
  issuer: "https://xxxxxx/sp",
  clientID: 'xxxx',
  clientSecret: 'xxxx',
  callbackURL: 'https://localhost:3000/authorization-code/callback',
  scope: 'openid profile'
}, (issuer, sub, profile, accessToken, refreshToken, done) => {
        console.log(profile);
  return done(null, profile);
}));

But this error occured :

TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
    at validateString (internal/validators.js:117:11)
    at Url.parse (url.js:159:3)
    at Object.urlParse [as parse] (url.js:154:13)
    at new Strategy (/tmp/myapp/node_modules/passport-openidconnect/lib/strategy.js:40:60)
    at Object.<anonymous> (/tmp/myapp/app.js:21:22)

Do you have an idea or a working example ?

Thanks

@jonathangaldino
Copy link

I went through the same issue. You have to mention the userInfoURL as well.

@sorokya
Copy link

sorokya commented May 13, 2022

Well the maintainer totally removed discovery so I guess this can be closed. I'll be using openid-client to do discovery and feed the config into OpenIdConnectStrategy 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants