django-social-auth incorrect authentication service

前端 未结 3 538
慢半拍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 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.

提交回复
热议问题