mattupstate/flask-social — pull request #19 by eriktaubeneck (2013-10-04 21:16:06+00:00)
Title: fix connect_callback() so redirect is correct upon failure

This fixes [Issue 18](https://github.com/mattupstate/flask-social/issues/18).

Since the result of the `connect` function was being handed directly to `connect_handler`, the `redirect` was being consumed as `cv` in `connect_handler`, rather than actually performing the redirect. Moving the check if `cv` is `None` outside of the `connect` function fixes the issue.