jaredhanson / passport-facebook

Facebook authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-facebook/?utm_source=github&utm_medium=referral&utm_campaign=passport-facebook&utm_content=about
MIT License
1.29k stars 447 forks source link

All values for authType that do not make your plugin throw? #206

Open wzup opened 7 years ago

wzup commented 7 years ago

I want to store authType in a config file and change it at will. It means that the parameter is always specified in my call to passport.authenticate(''):

// Wrong: authType is hardcoded.
passport.authenticate('facebook', {  authType: 'rerequest', scope: config.social.facebook.scope }));

// Right: authType comes from config
passport.authenticate('facebook', {  authType: config.authType, scope: config.scope }));

So, when authType is not rerequest what is it? So your plugin wouldn't throw on wrong values