@app.route('/login')
def demo():
    'Step 1: User Authorization.\n\n    Redirect the user/resource owner to the OAuth provider (i.e. Github)\n    using an URL with a few key OAuth parameters.\n    '
    auth_tuple = app.config['auth_client'].authorization_url()
    session['oauth_state'] = auth_tuple[1]
    return redirect(auth_tuple[0])
Step 1: User Authorization.

Redirect the user/resource owner to the OAuth provider (i.e. Github)
using an URL with a few key OAuth parameters.
@app.route('/login')
def demo():
    'Step 1: User Authorization.\n\n    Redirect the user/resource owner to the OAuth provider (i.e. Github)\n    using an URL with a few key OAuth parameters.\n    '
    auth_tuple = app.config['auth_client'].authorization_url()
    session['oauth_state'] = auth_tuple[1]
    return redirect(auth_tuple[0])