btouellette / concarneau

Multiplayer web game using the same rules as Carcassone
MIT License
65 stars 10 forks source link

Game doesn't start without setting up OAuth #32

Closed barkasn closed 4 years ago

barkasn commented 4 years ago

I'm trying to self-host the game and it doesn't seem to start without setting up OAuth. Specifically I am installing on a clean ubuntu 18.04 VM on which I installed npm and followed the instructions on the README. Just in case I also installed mongodb.

The output I get is this:

$ node server.js
/home/barkasn/concarneau/node_modules/passport-oauth1/lib/strategy.js:84
  if (options.consumerSecret === undefined) { throw new TypeError('OAuthStrategy requires a consumerSecret option'); }
                                              ^

TypeError: OAuthStrategy requires a consumerSecret option
    at Strategy.OAuthStrategy (/home/barkasn/concarneau/node_modules/passport-oauth1/lib/strategy.js:84:53)
    at new Strategy (/home/barkasn/concarneau/node_modules/passport-twitter/lib/strategy.js:53:17)
    at module.exports (/home/barkasn/concarneau/config/passport.js:245:18)
    at Object.<anonymous> (/home/barkasn/concarneau/server.js:76:29)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3

It would be great if there were instructions to get the game up and running without requiring making accounts for 3 different OAuth Providers

barkasn commented 4 years ago

I should note that I've tried setting up dummy values for the tokens and I get:

$ node server.js 
Server listening on port 8080
Error: Twit config must include `access_token_secret` when using user auth.
    at /home/barkasn/concarneau/node_modules/twit/lib/twitter.js:511:13
    at Array.forEach (<anonymous>)
    at Twitter._validateConfigOrThrow (/home/barkasn/concarneau/node_modules/twit/lib/twitter.js:508:17)
    at new Twitter (/home/barkasn/concarneau/node_modules/twit/lib/twitter.js:58:8)
    at Object.<anonymous> (/home/barkasn/concarneau/app/gameserver.js:34:15)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/barkasn/concarneau/server.js:142:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
btouellette commented 4 years ago

Should be simple to just remove all OAuth code if you don't intend to use it. As is it won't run without them.