jaredhanson / passport-openidconnect

OpenID Connect authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-openidconnect/?utm_source=github&utm_medium=referral&utm_campaign=passport-openidconnect&utm_content=about
MIT License
191 stars 177 forks source link

Dynamic callback URL #46

Closed atalis closed 7 years ago

atalis commented 7 years ago

Can the callback URL be set dynamically, in the authenticate() method, similarly to the option in FacebookStrategy (see some examples in https://github.com/jaredhanson/passport-facebook/issues/2):

app.get('/login', passport.authenticate('facebook', { callbackURL:"/auth/callback", successRedirect : '...', failureRedirect : '/...' }) );

Using dynamic callback URLs is necessary for situations where authentication is done on a backend server with auth requests being proxied to it by a number of web servers, not a single one. Or when multiple applications are hosted on a single Web server.

atalis commented 7 years ago

Apparently a similar option works for this package, even though it has not been documented.

degola commented 7 years ago

what is this option?

kinjalkparmar commented 4 years ago

Can anyone please post the solution for this. Thanks.