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...
Asked
Active
Viewed 1,135 times
-2

dhana
- 6,487
- 4
- 40
- 63
2 Answers
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
-
Thanks for reply. But my client asking also logout from facebook. Lets take facebook javascript sdk it contains FB.logout(). Please help me. – dhana Jun 11 '13 at 03:38
-
Ok -- see my update to the answer... – pennersr Jun 11 '13 at 21:42
-
Ok I have already saw your repo. Thanks for great reply. – dhana Jun 12 '13 at 03:51
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