]> git.parisson.com Git - django-social-auth.git/commitdiff
Leave exception handling to decorator
authorMatías Aguirre <matiasaguirre@gmail.com>
Fri, 9 Sep 2011 00:54:12 +0000 (21:54 -0300)
committerMatías Aguirre <matiasaguirre@gmail.com>
Fri, 9 Sep 2011 00:54:12 +0000 (21:54 -0300)
social_auth/views.py

index d084fb8b874a1180420a17480acd0130d2d9c45e..ed9237a670a760c9f04ed020818cfc61168aecdd 100644 (file)
@@ -183,11 +183,4 @@ def auth_complete(request, backend, user=None):
     """Complete auth process. Return authenticated user or None."""
     if user and not user.is_authenticated():
         user = None
-
-    try:
-        user = backend.auth_complete(user=user)
-    except ValueError, e:  # some Authentication error ocurred
-        error_key = getattr(settings, 'SOCIAL_AUTH_ERROR_KEY', None)
-        if error_key:  # store error in session
-            request.session[error_key] = str(e)
-    return user
+    return backend.auth_complete(user=user)