以下是我在使用passport-twitter
-
Error: Failed to find request token in session
at Strategy.OAuthStrategy.authenticate (/MYPROJECT/node_modules/passport-twitter/node_modules/passport-oauth1/lib/strategy.js:142:54)
at Strategy.authenticate (/MYPROJECT/node_modules/passport-twitter/lib/strategy.js:85:40)
at attempt (/MYPROJECT/node_modules/passport/lib/middleware/authenticate.js:337:16)
at Object.authenticate [as handle] (/MYPROJECT/node_modules/passport/lib/middleware/authenticate.js:338:7)
at next_layer (/MYPROJECT/node_modules/express/lib/router/route.js:103:13)
at Route.dispatch (/MYPROJECT/node_modules/express/lib/router/route.js:107:5)
at /MYPROJECT/node_modules/express/lib/router/index.js:205:24
at Function.proto.process_params (/MYPROJECT/node_modules/express/lib/router/index.js:269:12)
at next (/MYPROJECT/node_modules/express/lib/router/index.js:199:19)
at next (/MYPROJECT/node_modules/express/lib/router/index.js:176:38)
以下是我实施的Scotch Twitter Signup教程,FB signup
工作正常。
FYI -
我在twitter上多次检查配置,一切似乎都没问题(callbackURL,密钥,秘密等)。
我检查了以下URL,但没有运气。
我的开发网址就像 - http://192.XXX.XXX.XX:PORT_NUMBER
以下是我的app.js
app.js
以下是我的passport.js
passport.js
以下是我的model.js
buyer.js
让我知道我做错了什么,因为我现在完全迷失了错误:(
答案 0 :(得分:1)
我也是这样。这对我有所帮助:
https://github.com/jaredhanson/passport-twitter/issues/45#issuecomment-66934259
它是从localhost:300调用但我的回调URL设置为127.0.0.1:3000。我将我的回调URL更改为localhost:3000,问题解决了。