Facebook身份验证 - PassportJS - 错误:连接ETIMEDOUT

时间:2014-03-07 11:45:37

标签: node.js proxy passport.js

我的passportJs应用程序在我的家庭网络(在localhost上)运行,但它没有运行不同的网络(我的办公室)。

我想我需要设置一些代理设置(因为我们在办公室使用代理服务器,我们有代理用户通过,有些应用程序使用这个代理设置(npm,git,eclipse update vs),但我不知道如何在passportjs或Nodejs App上进行设置。)

我的app.js配置:

app.configure(function() {
  app.set('views', __dirname + '/views');
  app.set('view engine', 'jade');
  app.use(express.logger());
  app.use(express.cookieParser());
  app.use(express.bodyParser());
  app.use(express.methodOverride());
  app.use(express.session({ secret: 'my_precious' }));
  app.use(passport.initialize());
  app.use(passport.session());
  app.use(app.router);
  app.use(express.static(__dirname + '/public'));
});

文档页面(示例示例):http://mherman.org/blog/2013/11/10/social-authentication-with-passport-dot-js/

错误:

  

错误:连接ETIMEDOUT       在Strategy.OAuth2Strategy._createOAuthError(C:\ DDiski \ nodejs \ passport-examples-master \ node_modules \ passport-facebook \ node_modules \ passport-oauth2 \ lib \ strategy.js:340:17)       在C:\ DDiski \ nodejs \ passport-examples-master \ node_modules \ passport-facebook \ node_modules \ passport-oauth2 \ lib \ strategy.js:173:43       在C:\ DDiski \ nodejs \ passport-examples-master \ node_modules \ passport-facebook \ node_modules \ passport-oauth2 \ node_modules \ oauth \ lib \ oauth2.js:162:18       在ClientRequest。 (C:\ DDiski \的NodeJS \护照的例子,主\ node_modules \护照的Facebook \ node_modules \护照的oauth2 \ node_modules \的OAuth \ lib中\ oauth2.js:133:5)       在ClientRequest.EventEmitter.emit(events.js:95:17)       在CleartextStream.socketErrorListener(http.js:1547:9)       在CleartextStream.EventEmitter.emit(events.js:95:17)       在Socket.onerror(tls.js:1445:17)       在Socket.EventEmitter.emit(events.js:117:20)       在net.js:441:14

- 如何在办公室网络上运行此应用程序?我如何设置代理设置

0 个答案:

没有答案
相关问题