[Django]-Django-social auth KeyError

4👍

You need to add 'social_auth.backends.pipeline.misc.save_status_to_session' before each method that issues a redirect and halts the process. It works with Facebook because Facebook discloses email addresses, but Twitter doesn’t. So, add that method before any entry that does a redirect, or call it within the pipeline code before doing the redirect.

(Just posting the comment as an answer so it can be selected)

👤omab

0👍

You get the following error because you are trying to access the session name with this request.session[name]. That format is suppose to use in storing a session. To fix that,

name = setting('SOCIAL_AUTH_PARTIAL_PIPELINE_KEY', 'partial_pipeline')
request.session['saved_user'] = user
############################################
request.session['name'] = name 
backend = request.session.get('name') // this is the session format in getting the data
############################################
return redirect('socialauth_complete', backend=backend)

Leave a comment