It's not really simple to implement, but you can override the default strategy and in your custom version override the get_setting()
method, like this:
from django.conf import settings
from social.strategies.django_strategy import DjangoStrategy
class CustomDjangoStrategy(DjangoStrategy):
def get_setting(self, name):
if name == 'LOGIN_ERROR_URL' and self.request.is_ajax():
return '/auth/error/ajax'
else:
return getattr(settings, name)
Put that into a module and define SOCIAL_AUTH_STRATEGY = app.module.CustomDjangoStrategy
in your settings.