title: How to process passport authenticate function in as request handler function
body: <p>I am creating a web application based on Node.js and Express 4. I am also using Passportjs and Google OAuth 2 Startegy for authentication.</p>
  
  <p>I am trying to configure my routes in order to process requests. 
  I have learned that this line work well:</p>
  
  <pre><code>router.get('/signin/google/callback', passport.authenticate('google', {failureRedirect: '/signin'}));
  </code></pre>
  
  <p>but when I decided to handle the route in the function, application stopped responding:</p>
  
  <pre><code>router.get('/signin/google/callback', function (req, res) {
      passport.authenticate('google', {failureRedirect: '/signin'});
  });
  </code></pre>
  
  <p>Do I miss something? thanks in advance</p>