Could someone help please, I'm trying to use this module (https://github.com/jaredhanson/passport-instagram) to add sign/signup with Instagram to my angular-fullstack (https://github.com/angular-fullstack/generator-angular-fullstack) app but I'm getting the following error when trying to run the app via gulp serve.
This error is now a road-block for me right now as I have spent a long time searching all over the web for any possible tips on how to go about debugging the issue, but no luck so far, could someone be generous enough to give me some guidance as what could possibly be wrong or how to fix this...?
Note: My app is passing the clientID and the secret via a config file in my code. (server > config > environment > index.js). This config file works just fine for Google and Facebook social signup/signin.
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`
}
The error is:
/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...
Thank you for your help.