Hello!
I used DSA to authenticate my mobile app in django. But few days ago I decided to use PSA.
Everything worked good with DSA but when I try to use PSA I get this error:
http://dpaste.com/hold/1536153/And here is my code:
from django.conf import settings
from social.backends.utils import get_backend
from social.apps.django_app.utils import load_strategy
@csrf_exempt
@never_cache
def mobile_auth(request, *args, **kwargs ):
user= None
backend = 'vk-oauth2' # 'facebook'
access_token = request.GET.get('access_token') or request.POST.get('access_token')
user_id = request.GET.get('user_id') or request.POST.get('user_id')
social_auth_backend = get_backend(settings.AUTHENTICATION_BACKENDS, backend)
if social_auth_backend and user_id and access_token:
social_auth = social_auth_backend(strategy=load_strategy())
user = social_auth.do_auth(access_token, response={'user_id': user_id})
#... here comes non-relevant code
Could you help me resolve this issue?
Best regards,
Roman