HWIOAuthBundle - FOSUserBundle - Symfony 2 - 使用Facebook登录后重定向到自定义路径 [英] HWIOAuthBundle - FOSUserBundle - Symfony 2 - Redirect to custom path after login with facebook
本文介绍了HWIOAuthBundle - FOSUserBundle - Symfony 2 - 使用Facebook登录后重定向到自定义路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在用户登录Facebook帐户后,出现以下问题:将其重定向到以下路由 /#_ = _
Reflected the following problem after the user login with the Facebook account: that is redirected to the following route /#_=_
如何重定向到这个路由: /
或更多的这个 /#
How can I redirect it to this route instead: /
Or to more to this /#
?
在客户端,我使用骨干网。
On the client side, I use the backbone.
推荐答案
使用javascript重定向。添加以下页面。
Redirect using javascript. Add following to the page.
<script>
// Handle facebook callback
if (window.location.hash && window.location.hash == '#_=_') {
window.location.hash = '';
}
</script>
这篇关于HWIOAuthBundle - FOSUserBundle - Symfony 2 - 使用Facebook登录后重定向到自定义路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文