Javascript 护照一体化问题

Javascript 护照一体化问题,javascript,angularjs,angular-fullstack,passport.js,passport-facebook,Javascript,Angularjs,Angular Fullstack,Passport.js,Passport Facebook,有人能帮忙吗, 我正在尝试使用此模块()向angular fullstack()应用程序添加使用Instagram的注册,但在尝试通过gulp serve运行应用程序时出现以下错误 这个错误现在对我来说是一个路障,因为我花了很长时间在网上搜索关于如何调试这个问题的任何可能的提示,但是到目前为止没有运气,有人能慷慨地给我一些指导,告诉我什么可能是错的,或者如何修复这个问题 注意:我的应用程序正在通过我代码中的配置文件传递clientID和密码。(服务器>配置>环境>索引.js)。 此配置文件适用于

有人能帮忙吗, 我正在尝试使用此模块()向angular fullstack()应用程序添加使用Instagram的注册,但在尝试通过gulp serve运行应用程序时出现以下错误

这个错误现在对我来说是一个路障,因为我花了很长时间在网上搜索关于如何调试这个问题的任何可能的提示,但是到目前为止没有运气,有人能慷慨地给我一些指导,告诉我什么可能是错的,或者如何修复这个问题

注意:我的应用程序正在通过我代码中的配置文件传递clientID和密码。(服务器>配置>环境>索引.js)。 此配置文件适用于Google和Facebook社交注册/登录

instagram: {
    clientID: process.env.INSTAGRAM_ID || 'instagram client id goes here',
    clientSecret: process.env.INSTAGRAM_SECRET || 'instagram secret goes here',
    callbackURL: `${process.env.DOMAIN || ''}/auth/instagram/callback`
}
错误是:

/myapp/node_modules/passport-oauth2/lib/strategy.js:82
      if (!options.clientID) { throw new TypeError('OAuth2Strategy requires a clientID option'); }
                                     ^
TypeError: OAuth2Strategy requires a clientID option
        at Strategy.OAuth2Strategy (/myapp/node_modules/passport-oauth2/lib/strategy.js:82:34)
        at new Strategy (/myapp/node_modules/passport-instagram/lib/strategy.js:48:18)
        at Object.setup (/myapp/server/auth/instagram/passport.js:5:16)
        at Object.<anonymous> (/myapp/server/auth/index.js:11:33)
        at Module._compile (module.js:570:32)
        at loader (/myapp/node_modules/babel-register/lib/node.js:144:5)
        at Object.require.extensions.(anonymous function) [as .js] (/myapp/node_modules/babel-register/lib/node.js:154:7)
        at Module.load (module.js:487:32)
        at tryModuleLoad (module.js:446:12)
        at Function.Module._load (module.js:438:3)
        at Module.require (module.js:497:17)
        at require (internal/module.js:20:19)
        at Object.exports.default (/myapp/server/routes.js:15:20)
        at Object.<anonymous> (/myapp/server/app.js:34:1)
        at Module._compile (module.js:570:32)
        at loader (/myapp/node_modules/babel-register/lib/node.js:144:5)
        at Object.require.extensions.(anonymous function) [as .js] (/myapp/node_modules/babel-register/lib/node.js:154:7)
        at Module.load (module.js:487:32)
        at tryModuleLoad (module.js:446:12)
        at Function.Module._load (module.js:438:3)
        at Module.require (module.js:497:17)
        at require (internal/module.js:20:19)
        at Object.<anonymous> (/myapp/server/index.js:12:28)
        at Module._compile (module.js:570:32)
        at Object.Module._extensions..js (module.js:579:10)
        at Module.load (module.js:487:32)
        at tryModuleLoad (module.js:446:12)
        at Function.Module._load (module.js:438:3)
        [nodemon] app crashed - waiting for file changes before starting...
/myapp/node_modules/passport-oauth2/lib/strategy.js:82
如果(!options.clientID){throw new TypeError('OAuth2Strategy需要clientID选项');}
^
TypeError:OAuth2Strategy需要clientID选项
在Strategy.OAuth2Strategy(/myapp/node_modules/passport-oauth2/lib/Strategy.js:82:34)
在新策略中(/myapp/node_modules/passport instagram/lib/Strategy.js:48:18)
在Object.setup(/myapp/server/auth/instagram/passport.js:5:16)
反对。(/myapp/server/auth/index.js:11:33)
在模块处编译(Module.js:570:32)
在加载程序中(/myapp/node\u modules/babel register/lib/node.js:144:5)
at Object.require.extensions.(匿名函数)[as.js](/myapp/node_modules/babel register/lib/node.js:154:7)
在Module.load(Module.js:487:32)
在tryModuleLoad时(module.js:446:12)
在Function.Module.\u加载(Module.js:438:3)
at Module.require(Module.js:497:17)
根据需要(内部/module.js:20:19)
在Object.exports.default(/myapp/server/routes.js:15:20)
反对。(/myapp/server/app.js:34:1)
在模块处编译(Module.js:570:32)
在加载程序中(/myapp/node\u modules/babel register/lib/node.js:144:5)
at Object.require.extensions.(匿名函数)[as.js](/myapp/node_modules/babel register/lib/node.js:154:7)
在Module.load(Module.js:487:32)
在tryModuleLoad时(module.js:446:12)
在Function.Module.\u加载(Module.js:438:3)
at Module.require(Module.js:497:17)
根据需要(内部/module.js:20:19)
反对。(/myapp/server/index.js:12:28)
在模块处编译(Module.js:570:32)
在Object.Module.\u extensions..js(Module.js:579:10)
在Module.load(Module.js:487:32)
在tryModuleLoad时(module.js:446:12)
在Function.Module.\u加载(Module.js:438:3)
[nodemon]应用程序崩溃-正在等待文件更改,然后再启动。。。

谢谢您的帮助。

我也面临这个问题,并通过提供以下密钥解决了我的问题:

  • 谷歌客户端ID
  • 谷歌客户机密

  • 注意:我正在使用Google+API for OAuth进行身份验证

    我发现了一个非常简单的解决方案,直接通过facebook JDK,您只需在index.html中添加facebook SDK,然后,您只需复制并通过几行代码即可。我知道这是有效的。。。