Skip to content
Prev Previous commit
Next Next commit
Addressing PR comments
  • Loading branch information
abhidnya13 committed Apr 23, 2019
commit c7de03fad10ca9ef706d99075c55b8b9e16fcb58
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ def main_logic():
if state != flask.session['state']:
raise ValueError("State does not match")

result = application.acquire_token_silent(config["scope"], account=None)

if not result:
logging.info("No suitable token exists in cache. Let's get a new one from AAD.")
result = application.acquire_token_by_authorization_code(code, scopes=config["scope"],
result = application.acquire_token_by_authorization_code(code, scopes=config["scope"],
redirect_uri=config['redirect_uri'])
return flask.render_template('display.html', auth_result=result)

Expand Down