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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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).