Skip to content

Instantly share code, notes, and snippets.

@ricardochaves
Created February 2, 2019 17:32
Show Gist options
  • Save ricardochaves/9da41147968026a67cd39c72cc79ff1c to your computer and use it in GitHub Desktop.
Save ricardochaves/9da41147968026a67cd39c72cc79ff1c to your computer and use it in GitHub Desktop.
@app.route("/privateurl")
def privateurl():
if "access_token" not in flask.session:
return flask.redirect(flask.url_for("login"))
token = flask.session.get("access_token")
logging.info(f"Token: {token}")
return jsonify({"token": token})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment