Closed dbrgn closed 11 years ago
You can extend this middleware to force you needed behavior, for example try this:
from social_auth.middleware import SocialAuthExceptionMiddleware
from social_auth.exceptions import AuthFailed, AuthCancelled
class DSAMiddleware(SocialAuthExceptionMiddleware):
def get_redirect_uri(self, request, exception):
if isinstance(exception, AuthFailed):
return '/auth/failed'
elif isinstance(exception, AuthCancelled):
return '/auth/cancelled'
else:
return super(DSAMiddleware, self).get_redirect_uri(request, exception)
Then define the views for /auth/failed
and /auth/cancelled
Can I add custom error templates for the two errors above?