我一直在尝试Meteor。我想使用 OAuth 对我网站上的用户进行身份验证,因为我不想自己实现登录功能。
目前我的网站非常简单。计数器,单击按钮计数器就会加一。当用户转到另一台机器并登录其计数时,这个想法就会被保留。
我已按照以下步骤操作流星.com/accounts.
-
meteor add accounts-twitter
and meteor add accounts-ui
- Added
{{> loginButtons}}
到 HTML。
- 在Cloud9终端中
meteor --port $IP:$PORT
- 按照屏幕上的说明进行操作apps.twitter.com
- 设置网站
abc-matthewcanty.c9.io/
- 设置回调地址
http://0.0.0.0:8080/_oauth/twitter
- 这就是我被告知要做的。
- 复制到
API Key
and API Secret
- 选择基于弹出窗口的身份验证并按下保存
现在当我点击使用 Twitter 登录我收到一个弹出窗口,上面写着:
此网页无法使用
ERR_ADDRESS_INVALID
弹窗地址如下:
0.0.0.0:8080/_oauth/twitter/?requestTokenAndRedirect=true&state=eyJsb2dpblN……
Note那个使用abc-matthewcanty.c9.io/
因为回调 URL 没有区别。
这是因为我正在使用Cloud9 IDE我还需要做一些修改吗?
Meteor 文档没有提供进一步的步骤。可能假设了解 OAuth 作为先决条件,但没有这样声明。
Edit
我访问了以下 @tomas-hromnik 建议的网站:
http://www.servicepro.wiki/wiki/1171/cloud9-twitter-account-integration-for-sign-up
并更新了 apps.twitter.com 中的应用程序设置:
- 网站:https://abc-matthewcanty.c9.io/
- 回调网址:https://abc-matthewcanty.c9.io/也尝试过这个_oauth/twitter?关闭
当我点击按钮时,我不知道如何阻止它去http://0.0.0.0:8080/等