是否可以在 c9.io 上的 Meteor 应用程序 运行 上使用 Twitter 身份验证?

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

我创建了一个使用 Twitter 身份验证的 Meteor 应用程序。当 运行 在我的本地 linux 机器上时,twitter 设置运行良好,但当 运行 在 c9.io 上时不起作用。 twitter 登录弹窗重定向到http://0.0.0.0:8080/_oauth/twitter/?requestTokenAndRedirect=true&state=eyJs...,结果报错如下:

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


有没有办法让这个在 c9.io 上运行?


您需要设置ROOT_URL。

使用以下命令在 c9 上尝试 运行 你的 meteor 服务器:

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