How to debug Facebook login errors

134 views
Skip to first unread message

Alexander Todorov

unread,
Mar 31, 2014, 4:39:09 AM3/31/14
to django-so...@googlegroups.com
Hi folks,
I have a problem debugging Facebook login errors

For some reason the auth process fails but I don't seem to be able to get any information out of it.


In addition I'm hitting issue
https://github.com/omab/django-social-auth/issues/659

where the User object is created every time but no SocialAuthUser object is created at all.

I have DEBUG = True and SOCIAL_AUTH_RAISE_EXCEPTIONS = True  but all I see is DSA redirecting back to the LOGIN_ERROR_URL (which doesn't really do anything in my case) and no exceptions or anything like that.


My app is a simple Facebook login app, which collects the user name and email (newsletter sign up style) and redirects back to where the user came from.

Alexander Todorov

unread,
Mar 31, 2014, 6:26:24 AM3/31/14
to django-so...@googlegroups.com
Just FYI,
the app seems to work fine on localhost but errors out in production.

I was seeing a No handlers could be found for logger "SocialAuth" message in the
logs but that doesn't seem to be the problem (I tried disabling it).


--
Alex

Patrick Paul

unread,
Apr 1, 2014, 7:02:16 PM4/1/14
to django-so...@googlegroups.com
Did you figure out how to debug anything? I can't get an OpenID backend working and can't find any exceptions/errors in logs or messages app.

Alexander Todorov

unread,
Apr 2, 2014, 6:08:28 AM4/2/14
to django-so...@googlegroups.com
На 2.04.2014 02:02, Patrick Paul написа:
> Did you figure out how to debug anything? I can't get an OpenID backend
> working and can't find any exceptions/errors in logs or messages app.
>

Hi Patrick,
I didn't make any success with debugging. What I did is start from scratch with
a clean Django project and add Python Social Auth (instead of DSA). I also
stripped down the PIPELINE and left only with:

SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'social.pipeline.social_auth.auth_allowed',
'myapp.pipeline.store_user_details',
)

where store_user_details fetches name, email, etc. from the social backend and
stores it in a custom model, not the default User one. Also skips the
UserSocialAuth model.


It works for me although I have discovered something else, which may have been
the cause for previous errors.

When testing from multiple facebook accounts I've deleted the application from
the facebook account and tried to re-use it again. At this time I started
getting some errors, although I couldn't figure out why.

I still continued to get the information from the backend so I've modified my
app to just ignore this and redirect the user back to the website.


--
Alex

Reply all
Reply to author
Forward
0 new messages