1

I'm trying to figure out how to get my web application to handle AuthAlreadyAssociated Exception and tell the user they can't do that. (see AuthAlreadyAssociated Exception in Django Social Auth) Is there a way to invoke my subclass without forking DSA?

Oh, https://docs.djangoproject.com/en/dev/topics/http/middleware/ Hmmm.

But the provided app doesn't work as django middleware class. Need to look at example.

Community
  • 1
  • 1
gluejar
  • 89
  • 6
  • What do you mean with "doesn't work as django middleware"? The idea behind that middleware is to be subclassed to add the needed behavior for your project, take this as an example https://gist.github.com/omab/5177390 – omab Mar 16 '13 at 17:26
  • Thanks for the comment and example. I mean that AuthAlreadyAssociated exceptions are not in fact handled by the Middleware, which I don't understand. I ended up having to modify the pipeline class that throws the exception. – gluejar Mar 18 '13 at 19:38
  • 1
    Have finally figured this out. The provided middleware class, social_auth.middleware.SocialAuthExceptionMiddleware, only works when settings.DEBUG = False. Have submitted pull request with a proposed change. – gluejar Apr 09 '13 at 04:01
  • @gluejar, please add this as an answer including a link to the pull request – Catskul May 23 '14 at 21:45

0 Answers0