Django - How to remove the cached user data of the last session in Python Social Auth? -


i'm making sample login app python social auth.

my app provides user chance login facebook or twitter.

let's name of facebook account boel.facebook , 1 twitter boel.twitter.

this fragment of papeline.

def get_profile_picture(     strategy,     user,     response,     details,     is_new=false,     *args,     **kwargs     ):     img_url = none     if strategy.backend.name == 'facebook':         img_url = 'http://graph.facebook.com/%s/picture?type=large' \             % response['id']     elif strategy.backend.name == 'twitter':         img_url = response.get('profile_image_url', '').replace('_normal', '')       print('the user is: %s'%(user.username))     ### 

if user makes login facebook, console prints "the user is: boel.facebook" , app redirects logged page have link making logout, calls following function in views.py:

def logout(request):     auth_logout(request)    #redirect login page. 

at point user login page. until here, ok.

now, if user tries login twitter time, python social auth redirects twitter login , after user authenticated, pipeline called console prints: "the user boel.facebook" again.

so, doing wrong here?

since user authenticated twitter time, console had print:

"the user boel.twitter". 

please help.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -