My social-auth pipeline is as follows:
SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'social.pipeline.social_auth.auth_allowed',
'social.pipeline.social_auth.social_user',
'social.pipeline.user.get_username',
'social.pipeline.social_auth.associate_by_email',
'social.pipeline.user.create_user',
'social.pipeline.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.user_details',
'useraccounts.models.create_user_profile'
)
When 'useraccounts.models.create_user_profile' does following:
request = kwargs.get('request')
do_something(session_key=request.session.session_key)
Following error comes:
'QueryDict' object has no attribute 'session'
'Request' dictionary has elements with following keys: state, code, prompt, session_state, authuser
I am using Django version 1.5.5. The problem is coming since I have upgraded python-social-auth from v0.1.17 to v0.2.4
This may be because user_details function doesn't pass anything to next function in pipeline. As per your requirement you might need to change the order of functions in your pipeline:
Check this: https://github.com/omab/python-social-auth/blob/master/social/pipeline/user.py#L75
https://github.com/omab/python-social-auth/issues/978
Try to use
to access django request.