Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Express Passport Facebook回调被挂起_Express_Passport.js_Passport Facebook - Fatal编程技术网

Express Passport Facebook回调被挂起

Express Passport Facebook回调被挂起,express,passport.js,passport-facebook,Express,Passport.js,Passport Facebook,我正在使用passport facebook登录我的用户,但看来回调没有正常工作。当我尝试登录时,它会在chrome网络选项卡中显示一个挂起的请求: ****_6.在中国,一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司在一家公司的一家公司在一家公司的一家在一家在一家公司一家公司一家在一家公司一家在一家在一家公司一家在一家在一家公司一家公

我正在使用passport facebook登录我的用户,但看来回调没有正常工作。当我尝试登录时,它会在chrome网络选项卡中显示一个挂起的请求:

****_6.在中国,一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司的一家公司在一家公司在一家公司的一家公司在一家公司的一家在一家在一家公司一家公司一家在一家公司一家在一家在一家公司一家在一家在一家公司一家公司一家在一家在一家在一家在一家在一家在一家在一家在一家公司一家在一家在一家在一家在一家在一家公司一家在一家在一家在一家在一家在一家在一家在一家公司一家在一家在一家在一家在一家公司一家在一家在一家在一家在一家在一家6EW527XZ8BUGCHONNSQ2B1JT-

一段时间后,请求失败,状态为500。这就是我的节点服务器所显示的:

GET /auth/facebook 302 1.602 ms - 0
GET /auth/facebook/callback?code=***_EC2RZfeVmZPO26_GNC01khGONZ67hPUae2BMbaLnSAUWFDNYH9zAVuegm1EPJM3QOtgF821np0pAYGo0UeZgwEPb07R5p3UXtOi18vGy6I2QIYAOLbxpXPZ3Kbg6PKlQkuyI6upWB7vHnMHcSm6eybe0l5TjCkli9vmEXRM9Rmvv3uGu8n0fhSyLkzDqS8CDGsKBwdmW4wmNuL5pc-OaHHsVvguFlnZW4gvCvhhOJ3qle6p6dcIJa-1XAuRgKEukRXn8w7oxF_ueIHvO9cm6iGzvAkIOCfWIlY-wdm-ounTGH6EWhZuVUtRbWsq5kLxxuDPfRbKrhtDNeYWbuBV - - ms - -
GET /auth/facebook/callback?code=****_EC2RZfeVmZPO26_GNC01khGONZ67hPUae2BMbaLnSAUWFDNYH9zAVuegm1EPJM3QOtgF821np0pAYGo0UeZgwEPb07R5p3UXtOi18vGy6I2QIYAOLbxpXPZ3Kbg6PKlQkuyI6upWB7vHnMHcSm6eybe0l5TjCkli9vmEXRM9Rmvv3uGu8n0fhSyLkzDqS8CDGsKBwdmW4wmNuL5pc-OaHHsVvguFlnZW4gvCvhhOJ3qle6p6dcIJa-1XAuRgKEukRXn8w7oxF_ueIHvO9cm6iGzvAkIOCfWIlY-wdm-ounTGH6EWhZuVUtRbWsq5kLxxuDPfRbKrhtDNeYWbuBV FacebookTokenError: This authorization code has been used.
    at Strategy.parseErrorResponse (C:\Users\alucardu\IdeaProjects\movieseat-2.0\node_modules\passport-facebook\lib\strategy.js:196:12)
500 172.152 ms - 1326
at Strategy.OAuth2Strategy._createOAuthError (C:\Users\alucardu\IdeaProjects\movieseat-2.0\node_modules\passport-facebook\node_modules\passport-oauth2\lib\strategy.js:367:16)
at C:\Users\alucardu\IdeaProjects\movieseat-2.0\node_modules\passport-facebook\node_modules\passport-oauth2\lib\strategy.js:166:45
at C:\Users\alucardu\IdeaProjects\movieseat-2.0\node_modules\passport-facebook\node_modules\passport-oauth2\node_modules\oauth\lib\oauth2.js:177:18
at passBackControl (C:\Users\alucardu\IdeaProjects\movieseat-2.0\node_modules\passport-facebook\node_modules\passport-oauth2\node_modules\oauth\lib\oauth2.js:123:9)
at IncomingMessage.<anonymous> (C:\Users\alucardu\IdeaProjects\movieseat-2.0\node_modules\passport-facebook\node_modules\passport-oauth2\node_modules\oauth\lib\oauth2.js:143:7)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:913:12)
at nextTickCallbackWith2Args (node.js:442:9)
router.get('/facebook', passport.authenticate('facebook', {
  scope: ['email']
}));

router.get('/facebook/callback', passport.authenticate('facebook', {
    successRedirect: '/',
    failureRedirect: '/'
}));

passport.use('facebook', new FacebookStrategy({
    clientID: '****99027210110',
    clientSecret: '****4a1b8908ca7e43dc9ca6878d192',
    callbackURL: 'http://localhost:3000/auth/facebook/callback',
    passReqToCallback: true,
    enableProof: true,
    profileFields: ['displayName', 'emails']
}, function(req, accessToken, refreshToken, profile, done){
    var user = {};

    user.email          = profile.emails[0].value;
    user.displayName    = profile.displayName;

    user.facebook       = {};
    user.facebook.id    = profile.id;
    user.facebook.token = accessToken;

    done(null, user);
}));