Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get rid of the #_=_ in the facebook redirect of django-social-auth?

django-social-auth redirects me to /mypage#_=_ when using the the Facebook backend.

As I am working with jquery mobile on the front end, I can not accept that.

I found: https://developers.facebook.com/blog/post/552/ on the facebook developers site.

Change in Session Redirect Behavior

This week, we started adding a fragment #_=_ to the redirect_uri when this field is left blank. Please ensure that your app can handle this behavior.

So I tried settung SOCIAL_AUTH_LOGIN_REDIRECT_URL in the django-social-auth settings to something 'none blank'. No luck

So, how to I get rid of the hash thing?

Thanks a lot!

like image 703
wzr1337 Avatar asked Jun 23 '12 20:06

wzr1337


People also ask

What is the 20/20 rule for decluttering?

When struggling to make decluttering decisions, the 20/20 rule says you should consider letting go of an item if: You can replace it for less than $20. And you can replace it in less than 20 minutes.


1 Answers

Well, this may not be the exact solution, but adding following script to you head would help in fixing the problem:

<script type="text/javascript">
   if (window.location.hash == '#_=_') {
      window.location.hash = '';
   }
</script>
like image 113
Sudhir Bastakoti Avatar answered Sep 19 '22 17:09

Sudhir Bastakoti