Created
February 2, 2019 17:30
-
-
Save ricardochaves/2b9cc37b10d4e80bc12ff394c7f39173 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.route("/login") | |
def login(): | |
auth_state = str(uuid.uuid4()) | |
flask.session["state"] = auth_state | |
authorization_url = TEMPLATE_AUTHZ_URL.format( | |
config.TENANT, config.CLIENT_ID, REDIRECT_URI, auth_state, config.RESOURCE | |
) | |
resp = flask.Response(status=307) | |
resp.headers["location"] = authorization_url | |
return resp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment