passport / discuss

A forum for discussing topics related to the usage of Passport.js.
1 stars 0 forks source link

Can I dynamically configure strategy per-domain? #30

Open bbalban opened 5 years ago

bbalban commented 5 years ago

Hello, I want to use different credentials and callback url for PassportJS strategies, based on the current domain. I want to use this so that I can use one application serving multiple domains, with different social applications.

Is this possible?

Thanks! Bahadir

bbalban commented 5 years ago

To be more specific, I'd like to modify below 3 parameters in a middleware, based on the domain, preferably without creating a new Strategy object every time.

clientID: facebook.appId, clientSecret: facebook.appSecret, callbackURL: facebook.callbackURL,