omab/django-social-auth — pull request #432 by estebistec (2012-08-07 02:22:40+00:00)
Title: First pass at middleware for handling auth exceptions

So, the idea is currently simply that you can either configure a static URL to redirect to, or provide a function (that is dynamically loaded at runtime) which accepts the request and exception. I'm only handling the new already-associated exception for now, as it appears most of the other sub-types are not anything user's can deal with. Also, is there a good way to get the current target redirect from the backend (the page the user had clicked a "login" or "associate" button on, NOT the auth redirect itself)? If so, that would probably be best.