js-data / js-data-examples

Example client-side and server-side apps that use various combinations of js-data and its adapters.
MIT License
40 stars 15 forks source link

Oauth Errors #2

Closed winkler1 closed 8 years ago

winkler1 commented 9 years ago

Can't run the server examples because of OAuth errs. Some pointers on setting up the secrets and config would remove friction from checking this stuff out-

/Users/jeffwinkler/repos/js-data-examples/server/rethinkdb/node_modules/passport-github/node_modules/passport-oauth/lib/passport-oauth/strategies/oauth2.js:66
  if (!options.clientID) throw new Error('OAuth2Strategy requires a clientID o
                               ^
Error: OAuth2Strategy requires a clientID option
    at Strategy.OAuth2Strategy (/Users/jeffwinkler/rep
jmdobry commented 9 years ago
  1. Go to https://github.com/settings/developers
  2. Click Register new Application
  3. Name the application my-js-data-test or something
  4. Set the Homepage URL to http://127.0.0.1:3000
  5. Set the Authorization callback URL to http://127.0.0.1:3000/auth/github/callback
  6. Click Register Application
  7. It will then show you the generated Client ID and Client Secret
  8. Put them into the app: https://github.com/js-data/js-data-examples/blob/master/server/rethinkdb/app/container.js#L19