django-social-auth incorrect authentication service

前端 未结 3 535
慢半拍i
慢半拍i 2021-01-18 21:42

I was trying to use django-social-auth today, but turned out I got an error everytime I tried to login using it.

I was using the example found in its git master branc

相关标签:
3条回答
  • 2021-01-18 21:59

    In my case the problem was that I had FACEBOOK_APP_SECRET instead of FACEBOOK_API_SECRET. It was due to the fact that I migrated from django-facebook to django-social-auth.

    0 讨论(0)
  • 2021-01-18 22:02

    Well, without seeing your configuration this will simply be a shot in the dark. But the django-social-auth code has this:

    def complete_process(request, backend):
        """Authentication complete process"""
        backend = get_backend(backend, request, request.path)
        if not backend:
            return HttpResponseServerError('Incorrect authentication service')
        ...
    

    So, offhand, I would guess that you don't have the right backend configured or, at the very least, Django can't find it. Make sure you have the appropriate backend configured in AUTHENTICATION_BACKENDS and that you've obtained the required OAuth keys from the service you want to use.

    Keep in mind, too, that this error occurs in the django-social-auth code in a few places, but always when the specified backend can't be retrieved.

    0 讨论(0)
  • 2021-01-18 22:08

    It may be you don't have the FACEBOOK_APP_ID or FACEBOOK_API_SECRET set.

    0 讨论(0)
提交回复
热议问题