Authentication failed use Django Social Auth

auth for facebook authentication but i’m getting error anda this is full traceback error:

Environment:
Request Method: GET
Request URL: http://127.0.0.1:8080/complete/facebook/?redirect_state=lx61clpfCQaHbM0q2Nbr4QRtX9aM3bn8&code=AQAtzyjMHnuP5L_3saAZCgAC4tTabJeIXXWxFHW2EHYKCed-imajO3ZHDA6OnGFjBfTemllw4dDNO9vQXAUqInAaDEBQW_Rizmy5r16pykDbDQuYTtb4o6uQKfwhYjtjXv2lyM12HqywsnV4UDsyTNMrZBaU_zeliVTd3FnliRgTvlCladynvUgRVrcdnNyHt70mEFlEpsoJ-ZY329zQiQFZKjuhPlJ1zoMKMOzMoiBae4VgvkD8ezdp-7wbdeThL9R_M688SrbyPq_lvR-QjAZsLKcMnBZ1yX3BbgtsRq5rDB1rKJ44LG_mpbMyGHRpUNM&state=lx61clpfCQaHbM0q2Nbr4QRtX9aM3bn8

Django Version: 1.7
Python Version: 2.7.3
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'django.contrib.flatpages',
 'kerajinan',
 'bootstrap3',
 'registration',
 'pagination_bootstrap',
 'social_auth')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'pagination_bootstrap.middleware.PaginationMiddleware')


Traceback:
File "/home/apsijogja/django/kerajinan/myvenv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/apsijogja/django/kerajinan/myvenv/local/lib/python2.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
  57.         return view_func(*args, **kwargs)
File "/home/apsijogja/django/kerajinan/myvenv/local/lib/python2.7/site-packages/social_auth/decorators.py" in wrapper
  29.             return func(request, request.social_auth_backend, *args, **kwargs)
File "/home/apsijogja/django/kerajinan/myvenv/local/lib/python2.7/site-packages/social_auth/views.py" in complete
  41.         return complete_process(request, backend, *args, **kwargs)
File "/home/apsijogja/django/kerajinan/myvenv/local/lib/python2.7/site-packages/social_auth/views.py" in complete_process
  107.     user = auth_complete(request, backend, *args, **kwargs)
File "/home/apsijogja/django/kerajinan/myvenv/local/lib/python2.7/site-packages/social_auth/views.py" in auth_complete
  190.     return backend.auth_complete(user=user, request=request, *args, **kwargs)
File "/home/apsijogja/django/kerajinan/myvenv/local/lib/python2.7/site-packages/social_auth/backends/facebook.py" in auth_complete
  139.                 raise AuthFailed(self, 'There was an error authenticating '

Exception Type: AuthFailed at /complete/facebook/
Exception Value: Authentication failed: There was an error authenticating the app

i use django custom user model. i already set in setting.py

FACEBOOK_APP_ID              = 'XXX'
FACEBOOK_API_SECRET          = 'XXX'

LOGIN_REDIRECT_URL = '/account/login/'
LOGIN_URL = '/'

SOCIAL_AUTH_USER_MODEL = 'kerajinan.UserProfile'

before i ask Exception Value: create_user() takes at least 3 arguments (2 given) Django Social Auth and someone advice me to adding field password. but when i try to adding password in class Meta(UserCreationForm.Meta) i am getting error like this.

can you help me solve this problem?


Source: facebook

Leave a Reply