Getting an exception/error when people cancel partway through authentication

46 views
Skip to first unread message

Tobe Nwanna

unread,
Sep 25, 2013, 1:34:28 PM9/25/13
to python-so...@googlegroups.com
So I'm currently using the facebook and google-oauth2 backends for my site and when people are redirected and click cancel I want them to go back to my site but instead they simply see an error message (well a 500 on the production site). I entered in a value for SOCIAL_AUTH_LOGIN_ERROR_URL to handle this but it doesn't seem to be redirecting there. Maybe I'm handling this case incorrectly?

Matías Aguirre

unread,
Sep 25, 2013, 3:01:55 PM9/25/13
to python-social-auth
Add this middleware[1] to your middlewares setting, it will redirect any social
related exception to SOCIAL_AUTH_LOGIN_ERROR_URL which two query parameters,
message (exception message) and backend name (backend being used during the
process).

[1]: https://github.com/omab/python-social-auth/blob/master/social/apps/django_app/middleware.py#L11

Excerpts from Tobe Nwanna's message of 2013-09-25 14:34:28 -0300:
--
Matías Aguirre (matias...@gmail.com)

Tobe Nwanna

unread,
Oct 14, 2013, 4:14:12 PM10/14/13
to python-so...@googlegroups.com
I have both of those but it still doesn't seem to be working...it's going to this page /complete/backend_name instead of what I specified
Reply all
Reply to author
Forward
0 new messages