Search code examples
meteortwitter-oauthcloud9-ide

Is it possible to have Twitter authentication working on a Meteor app running on c9.io?


I have created a Meteor app that makes use of twitter authentication. The twitter setup works well when run on my local linux machine, but does not work when run on c9.io. The twitter login popup redirects to http://0.0.0.0:8080/_oauth/twitter/?requestTokenAndRedirect=true&state=eyJs... and the resulting error is as follows:

The webpage at http://0.0.0.0:8080/_oauth/twitter/
requestTokenAndRedirect=true&state=eyJsb2dpbl...IjpmYWxzZX0=
might be temporarily down or it may have moved permanently to
a new web address


Is there a way to make this work on c9.io?



Solution

  • You need to set ROOT_URL.

    Try running your meteor server on c9 with this command:

    ROOT_URL=https://your-app.c9.io meteor --port $IP:$PORT --settings settings.json