social-core icon indicating copy to clipboard operation
social-core copied to clipboard

Missing a "backend" when resolving the `LOGIN_ERROR_URL` setting in the exception middleware

Open offbyone opened this issue 2 years ago • 0 comments

In social_django/middleware.py, the redirect URI is resolved like this:

    def get_redirect_uri(self, request, exception):
        strategy = getattr(request, "social_strategy", None)
        return strategy.setting("LOGIN_ERROR_URL")

This doesn't pass the backend into strategy.setting() which means it doesn't load a backend-specific view.

offbyone avatar Jan 14 '24 17:01 offbyone