pennersr / django-allauth

Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.
https://allauth.org
MIT License
9.51k stars 3.03k forks source link

Reddit: Social Network Login Failure #1244

Closed gustavklopp closed 8 years ago

gustavklopp commented 8 years ago

I've successfully implemented django-allauth for Stackexchange but can't get it working with Reddit.

I've got the screen where I authorized the app, then after it, I'm sent to : http://localhost:8000/accounts/reddit/login/callback/?state=(some numbers...)&code=(some numbers...):

Social Network Login Failure
An error occurred while attempting to login via your social network account.

in https://www.reddit.com/prefs/apps : MyApp web ap (some app id)

secret: (some secret key) name: MyApp description: MyApp about url: redirect uri: http://localhost:8000/accounts/reddit/login/callback/

in http://localhost:8000/admin/socialaccount/socialapp/ Provider: Reddit name: MyApp client id: (some App id) secret key: (some secret key) chosen site: example.com

in settings.py I've only put, in addition to the requirements written in the docs: LOGIN_REDIRECT_URL = 'main_page'

gustavklopp commented 8 years ago

(I thought the error disappeared, but it's till there...)

pennersr commented 8 years ago

Debugging project specific setups is not feasible for me. I would say use pdb to step through the OAuth2CallbackView.dispatch() code (allauth.socialaccount.providers.oauth2.views).. then inspect the OAuth2Error or PermissionDenied that is likely the cause of your failure. Closing... if you bump into an issue in allauth that needs fixing feel free to reopen.