Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: OAuth2Strategy requires a clientID option #12

Closed
TheFurnace opened this issue Feb 26, 2017 · 5 comments
Closed

TypeError: OAuth2Strategy requires a clientID option #12

TheFurnace opened this issue Feb 26, 2017 · 5 comments

Comments

@TheFurnace
Copy link

PS C:\Users\ferda\dev\web\express-4.x-facebook-example> node server.js
C:\Users\ferda\dev\web\express-4.x-facebook-example\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 (C:\Users\ferda\dev\web\express-4.x-facebook-example\node_modules\passport-oauth2\lib\str
ategy.js:82:34)
at new Strategy (C:\Users\ferda\dev\web\express-4.x-facebook-example\node_modules\passport-facebook\lib\strategy.js:
54:18)
at Object. (C:\Users\ferda\dev\web\express-4.x-facebook-example\server.js:13:14)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:420:7)

@neihcnim
Copy link

neihcnim commented Jul 28, 2018

I too hit this error. You are suppose to have a clientID or appID option.

Go to developer.facebook.com, click on 'my app', settings, basic to get your clientID (or appid) and app secret.

Modify, clientID and clientSecret with your appid and app secret in server.js line 14.

@joeykay9
Copy link

joeykay9 commented Jun 6, 2019

I too hit this error. You are suppose to have a clientID or appID option.

Go to developer.facebook.com, click on 'my app', settings, basic to get your clientID (or appid) and app secret.

Modify, clientID and clientSecret with your appid and app secret in server.js line 14.

Did that but still getting the same error

@rithiksachdev
Copy link

@joeykay9 did you find any solution?

@rithiksachdev
Copy link

@jaredhanson the problem still persists, can you please suggest a solution?

@Nenikagupta
Copy link

Add environment variable in .env file.
Remember client_id name is FACEBOOK_CLIENT_ID and client_secret is FACEBOOK_CLIENT_SECRET. So don't forget to add same variable name is .env file.

jaredhanson added a commit that referenced this issue Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants