@app.route('/oauth/login')
def login():
    if app.debug:
        response = remote.authorize(callback=url_for('authorized', _external=True))
    else:
        response = remote.authorize(url_for('authorized', _external=True, _scheme='https'))
    return response
@app.route('/oauth/login')
def login():
    if app.debug:
        response = remote.authorize(callback=url_for('authorized', _external=True))
    else:
        response = remote.authorize(url_for('authorized', _external=True, _scheme='https'))
    return response