添加帐户系统后,如何通过手机访问我的meteor应用程序?

时间:2016-08-29 08:27:41

标签: meteor facebook-login meteor-accounts google-login

我可以通过输入服务器IP地址和端口来访问我的移动电话上的meteor应用程序。例如192.168.0.106:3000。当向我的老板展示进展时,这非常方便。

但是现在我已经添加并配置了Facebook和&通过以下方式将Google帐户系统添加到我的meteor应用程序中:

 meteor add accounts-facebook
 meteor add accounts-google

我只能通过计算机登录并访问我的应用程序。 当我尝试通过我的手机使用Facebook登录时,我被引导到错误页面,如果它说:

localhost:3000/_oauh/facebook?code=... where it says:
This site cannot be reached. Local host refused to connect. 
Try checking the connection...

并通过Google登录我被重定向到页面:

localhost:3000/_oauh/google?sate=... where it says:
This site cannot be reached. Local host refused to connect. 
Try checking the connection...

再次澄清,我只能在通过我的电脑登录后访问我的应用程序,但不能通过我的手机了。还有办法通过我的电脑和手机访问应用程序吗?

提前致谢!

1 个答案:

答案 0 :(得分:1)

问题在于localhost:3000。在设置FB应用程序时,您已将重定向URL设置为localhost:3000,并且它正尝试将其重定向到该应用程序。不幸的是,该地址在移动设备上不存在,因此,您将收到该错误。

获取域名并将其指向该IP。然后在FB / Google应用程序的重定向网址中使用该域名。

您必须获取域名,因为FB / Google不会重定向到IP。