当我尝试使用Facebook登录此站点时:
通过单击页面顶部的按钮,我将弹出一个URL:
我输入我的Facebook凭据并提交。在Safari中,此方法有效,登录完成。在Chrome中,弹出窗口为空白,但保持打开状态。弹出网址是
https://parlay.io/_oauth/facebook?close&code= ...
弹出控制台说:
未捕获到的SecurityError:阻止了源为“ https://parlay.io ”的框架访问源为“ http://parlay.io ”的框架。请求访问的帧的协议为“ https”,正在访问的帧的协议为“ http”。协议必须匹配。
错误发生在第23行:
我不知道为什么这个弹出窗口试图访问http://parlay.io
。我没有http
或http://parlay.io
在我的应用程序设置的任何地方。
This is using the 'popup' style oauth. When I switch to 'redirect' style in Chrome, the first time I login, I get this error on the server:
{"line":"398","file":"oauth_server.js","message":"Error in OAuth Server: redirectUrl (http://parlay.io/) is not on the same host as the app (https://parlay.io/)","time":{"$date":1435164688847},"level":"warn"}[parlay.io]
and I get redirected to same signin page. The second time I click login, it works. The second click can be automated with:
I had the exact same problem, under similar conditions (Meteor 1.3.x, ROOT_URL set to https, FB/Twitter apps set to https.)
对我而言,解决此问题的原因是将站点设置为始终将HTTP请求重定向到HTTPS。我正在使用Cloudflare,因此我按照此处的说明进行操作:
进行更改后,登录就像在不同计算机上一样具有魅力。最终结果在这里:
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句