Exemplo n.º 1
0
def callback():

    auth_token = request.args['code']
    auth_header = spotify.authorize(auth_token)
    session['auth_header'] = auth_header

    return profile()
Exemplo n.º 2
0
def callback():

    auth_token = request.args['code']
    auth_header = spotify.authorize(auth_token)
    session['auth_header'] = auth_header

    return (redirect(url_for("profile")))
Exemplo n.º 3
0
def callback():
    code = request.json.get('code')
    auth_token = code
    auth_header = spotify.authorize(auth_token)
    session['auth_header'] = auth_header

    return jsonify('OK')
Exemplo n.º 4
0
def callback():
    """
    Called from Auth endpoint. Retrieves auth token and redirects to home page.
    """
    auth_token = request.args['code']
    session['auth_header'] = spotify.authorize(auth_token, REDIRECT_URI)
    return redirect('/')
Exemplo n.º 5
0
def callback():

    flash('Login Succesful!')
    auth_token = request.args.get('code')
    auth_header = spotify.authorize(auth_token)
    session['auth_header'] = auth_header

    return render_template('home.html')