-2

I am new to django-allauth. I have successfully login from facebook using djang0-allauth. But I try to logout using '/accounts/logout'. It is also successfully logged out my application. But my problem is at the same time facebook not logged out(i.e; facebook not session expired.). Please solve my problem. Thanks...

dhana
  • 6,487
  • 4
  • 40
  • 63

2 Answers2

1

This is actually normal/accepted behavior. For example, take stackoverflow. Signing out there does not sign you out of e.g. your Google account. Or, signing in with Twitter on digg.com, then signing out does not sign you out from Twitter.

Update

I decided to make this a bit easier to do. Simply invoke window.allauth.facebook.logout(). This is new (yet to be released) functionality, committed here:

https://github.com/pennersr/django-allauth/commit/0f9fa49deb9ad95764e2cc8135576280ada17043

pennersr
  • 6,306
  • 1
  • 30
  • 37
0

I solved my issue. using following script

function logout_social() {

   FB.logout(function(response) {  // for facebook logout
  window.location.href = '/logout' // for my app logout
});
}

In html file

{% load socialaccount %} 
{% providers_media_js %} // for facebook plugins
dhana
  • 6,487
  • 4
  • 40
  • 63