omab / python-social-auth

Social auth made simple
http://psa.matiasaguirre.net
BSD 3-Clause "New" or "Revised" License
2.83k stars 1.09k forks source link

NoneType error upon authenticating user (Facebook) #1005

Closed geekscrapy closed 7 years ago

geekscrapy commented 8 years ago

The following error is reported when I have a user authenticate that has already been created. I've only tested this on Facebook.

django.get_version() = '1.9.8'

Request Method: GET Request URL: http://localhost:8000/complete/facebook/?redirect_state=NnCBQLERSV2fO0iFtVzUWpkaTBm2WNAP&code=AQCaa8m_gMjTEJMU3_jQrOw2wGOOoOM5vRdNawyqljmIoOinHfMJBUYQW7cn4xT1NzR759-6Hh0ZerB1Dr26Hy6jt0I6_crow1ox_GUT9GRQveHX6HH-o2nDa1GjTnql0KFn2dsxB9TErFmPkJevjf14x4BCK3vDMzRERDveMLaIcyYWT59lGSsL8srVFW9co_MOsvIzd4MSBSWZ1QwY9oZ1aiNEVd4UOV4F8NMZX0nDOg0_JjWctJNusY6vYb_JO0YvvelnOM59LtsoQ1IAB_uWdx11b9oF-DMk5dJGrnCINKjcQFOkdl8_45d97cw7AcENrmtPIWWjHrcUz5QdvOlT&state=NnCBQLERSV2fO0iFtVzUWpkaTBm2WNAP Django Version: 1.9.8 Exception Type: TypeError Exception Value:
argument of type 'NoneType' is not iterable Exception Location: /usr/local/lib/python2.7/site-packages/social/actions.py in do_complete, line 90 Python Executable: /usr/local/opt/python/bin/python2.7 Python Version: 2.7.11

geekscrapy commented 8 years ago

It looks like it's not getting/creating a user upon return from Facebook.

If I change:

LOGIN_URL = 'account:login' to LOGIN_URL = '/account/login/'

It doesn't error, but sends me to the login page.

geekscrapy commented 8 years ago

FYI, i'm also using the ?next param to send the user back to the same page at which they are authing

omab commented 7 years ago

Can't debug without a proper traceback and the data involved. Closing, please reopen in social-app-django if still relevant.