title: SailsJS and PassportJS Facebook auth
body: <p>I'm trying to use Passport with SailsJS.
  The <code>passport.authenticate('facebook')</code> method is never called and no response is sent.
  I initialize Passport and my strategies in <code>config/passports.js</code>.</p>
  
  <p><strong><code>config/passport.js</code></strong>:</p>
  
  <pre><code>const passport = require('passport');
  const FacebookStrategy = require('passport-facebook').Strategy;
  
  passport.serializeUser(function (user, done) {
    done(null, user.id);
  });
  
  passport.deserializeUser(function (id, done) {
    User.findOne({id: id}, function (err, user) {
      done(err, user);
    });
  });
  
  passport.use(new FacebookStrategy({
    /* IDS */
  }, (token, refreshToken, profile, next) =&gt; {
      /* logic here */
    })
  }));
  </code></pre>
  
  <p>I initialize passport and serialization methods.</p>
  
  <p>I setted <code>passport.init()</code> and <code>passport.session()</code> middlewares in the <code>config/http.js</code> file following this order :</p>
  
  <pre><code>'startRequestTimer',
  'cookieParser',
  'session',
  'passportInit',
  'passportSession',
  </code></pre>
  
  <p>The route <code>/auth/facebook</code> uses the following controller :</p>
  
  <pre><code>passport.authenticate('facebook', {scope: ['email', 'user_about_me']},
        (err, user) =&gt; {
          req.logIn(user, (err) =&gt; {
            if (err) return res.send(err);
            return res.redirect('/');
          })
        });
  </code></pre>
  
  <p>All my requests time out when I call <code>/auth/facebook</code>, passport never calls my authentication method.</p>
  
  <p>What did I do wrong ?</p>