title: How to pass an additional parameter to passport.authenticate
body: <p>(I already do <code>fbStrategy.passReqToCallback = true</code> ) I am riffing off 
  <a href="https://scotch.io/tutorials/easy-node-authentication-linking-all-accounts-together" rel="noreferrer">https://scotch.io/tutorials/easy-node-authentication-linking-all-accounts-together</a> but want to use this social authentication service for multiple apps, ex: the one that controls the heating system, the one that turns on the sprinklers etc.</p>
  
  <p>Basically if one of these apps checks with the server and doesn't have a correct token it get redirected to this social authentication service (social-auth). When the user presses on of the social login buttons it grabs the parameter of what app its arriving from and adds it as a parameter for <code>/auth/facebook/:appid</code></p>
  
  <pre><code>    // send to facebook to do the authentication
      app.get('/auth/facebook/:appId', function(req,res,next){
          passport.authenticate(
              'facebook', { scope : 'email' }
          )(req,res,next);
      });
  </code></pre>
  
  <p><code>req</code> of <code>req,res,next</code> is the serialized user record. At this point social-auth doesn't know who the user is. </p>
  
  <pre><code>fbStrategy.passReqToCallback = true;  
  passport.use(new FacebookStrategy(fbStrategy,
      function(req, token, refreshToken, profile, done) {
          var email = (profile.emails[0].value || '').toLowerCase()     
          process.nextTick(function() {...
  </code></pre>
  
  <p>Once authorization is complete I want to redirect back to the calling app and I need the <code>:appId</code> param to ride along so I can go back to the right site.</p>
  
  <p>Now generally it would work if I just made a variable like <code>currentAppId</code> accessible to the various social stategies but If you happened to have multiple people authenticating at the same time then you conceivably have a user return to the wrong app, or some other users app. That's why I need <code>appId</code> to travel as param to <code>passport.authenticate</code> . Where should I be looking to figure out how. Could I wrap <code>passport.authenticate</code> or otherwise modify things?</p>