Express プロジェクトを既に実行しています。パスポートを使用して Facebook で認証するように接続しようとしています。基本的には、こちらの github ページから例をコピーしました。
https://github.com/jaredhanson/passport-facebook
しかし、アプリで「/auth/facebook」URL にアクセスしようとすると、次のエラーが発生します。
TypeError: Object 302 has no method 'indexOf'
at ServerResponse.res.redirect (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/express/lib/response.js:546:13)
at Strategy.strategy.redirect (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/passport/lib/middleware/authenticate.js:294:15)
at Strategy.OAuth2Strategy.authenticate (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/passport-facebook/node_modules/passport-oauth2/lib/strategy.js:227:10)
at Strategy.authenticate (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/passport-facebook/lib/strategy.js:84:41)
at attempt (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/passport/lib/middleware/authenticate.js:337:16)
at authenticate (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/passport/lib/middleware/authenticate.js:338:7)
at callbacks (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/express/lib/router/index.js:171:11)
at param (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/express/lib/router/index.js:145:11)
at pass (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/express/lib/router/index.js:152:5)
at Router._dispatch (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/express/lib/router/index.js:179:5)