Permalink
Browse files

Merge pull request #3 from alexef/fix

If user denies access, redirect - #2
  • Loading branch information...
2 parents 64a6bf3 + 4b31ec9 commit 36816983c72f95e1d51f278cca825e24ecf10f4c @mattupstate committed Apr 24, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 flask_social/views.py
View
@@ -195,14 +195,16 @@ def login(response):
if response is None:
do_flash('Access was denied to your %s '
'account' % provider.name, 'error')
- return redirect(_security.login_manager.login_view)
+ return redirect(_security.login_manager.login_view), None
query = dict(provider_user_id=module.get_provider_user_id(response),
provider_id=provider_id)
return response, query
response, query = provider.authorized_handler(login)()
+ if query is None:
+ return response
return login_handler(response, provider, query)

0 comments on commit 3681698

Please sign in to comment.