使用 Authlogic 的 Facebooker 在授权后不会重定向到仪表板
除了一件事之外,我使用 Authlogic(使用 authlogic_facebook_connect 插件)实现 Facebooker 时,一切似乎都运行良好。
在应用程序初始授权后(通过单击 Facebook 弹出窗口上的“确定”),我仍然保留在登录页面上。没有重定向。但是,一旦我刷新登录页面,然后再次单击 Facebook 按钮,就没有弹出窗口,因为它已经获得 Facebook 授权,而是自动重定向到 /user_session (通过 Facebook 会话进行身份验证)并立即将我带到仪表板页面正如预期的那样。
附加信息:
知道为什么在授权 Facebook 后第一次点击时它不会重定向吗?授权后 URL 设置为 http:///user_session/,并且 authlogic 的路由设置正确。
我尝试过 Prototype 和 jQuery,两者都给出相同的结果。
如果您尝试使用 Facebook 进行身份验证,您会在本教程网站上看到相同的问题。该网站不是我的,因此请自行承担风险: http://facebooker.pjkh.com
谢谢。
Everything seems to be working fine with my implementation of Facebooker with Authlogic (using the authlogic_facebook_connect plugin) except for one thing.
After the initial authorization of the application (by clicking OK on the Facebook pop-up) I still remain on the login page. There is no redirection. However, once I refresh the login page and then click the Facebook button again, there is no popup because it is already authorized by Facebook, instead it redirects to /user_session (for authentication via Facebook session) automatically and immediately takes me to the dashboard page as expected.
Additional Information:
Any idea why it doesn't redirect on the very first click, right after authorizing Facebook? The post-authorize URL is set for http:///user_session/ and the routes for authlogic are set properly.
I have tried with Prototype and jQuery, both give the same results.
You can see the same issue on this tutorial website if you try to authenticate with Facebook. This website is not mine so try at your own risk:
http://facebooker.pjkh.com
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里也有同样的问题。我认为它使用jquery对我没有做任何事情的原因是生成的代码
类似于
jquery提交表单的代码是错误的,它应该是
(呃,因为我没有传入:js => ; :jquery)
但如果我解决了这个问题,我仍然会得到
所以我猜正确的详细信息没有被注入到表单中
Also having the same issue here. I think the reason it was doing nothing for me, using jquery, is the code generated by
which is something like
the jquery to submit the form is wrong it should be
(duh, because I did not pass in :js => :jquery)
but if I fix that I still get
so the right details are not being injected into the form I guess