Open Millen31 opened 7 years ago
Are not you calling done()
?
passport.use(new FacebookStrategy({...},
function(req, accessToken, refreshToken, profile, done) {
// do something...
process.nextTick(function () {
return done(null, profile); // <- call this
});
});
Hello,
I've some problem with Passport-Facebook. My Callback is pending for 1 Minute and then the error "FacebookTokenError: This authorization code has been used." appears. But I have this problem with just some users. If I login with my personal account, everything works fine. If I use an test user from Facebook, this error appears.
I'm using passport 0.3.2 and passport-facebook": "2.1.1",
My Code:
app.get('/auth/facebook', passport.authenticate('facebook', { scope: ['user_hometown', 'user_friends', 'public_profile', 'email' ] })); app.get('/auth/facebook/callback', passport.authenticate('facebook', { successRedirect: '/', failureRedirect: '/login/' }));
passport.use(new FacebookStrategy({ clientID: config.facebook.clientID, clientSecret: config.facebook.clientSecret, callbackURL: config.facebook.callbackURL, profileFields: ['id', 'displayName', 'first_name', 'middle_name', 'last_name','email', 'photos', 'hometown'] }, function(req, accessToken, refreshToken, profile, done) {...
Does anybody have an idea?
Thank and best regards