Skip to content

Commit 374e738

Browse files
committed
Flask sample reads secret from env var rather than cli
1 parent 5a0b55d commit 374e738

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sample/authorization-code-flow-sample/authorization_code_flow_sample.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@
2424
import json
2525
import logging
2626
import uuid
27+
import os
2728

2829
import flask
2930

3031
import msal
3132

3233
app = flask.Flask(__name__)
3334
app.debug = True
34-
app.secret_key = sys.argv[2] # In this demo, we expect a secret from 2nd CLI param
35+
app.secret_key = os.environ.get("FLASK_SECRET")
36+
assert app.secret_key, "This sample requires a FLASK_SECRET env var to enable session"
3537

3638

3739
# Optional logging

0 commit comments

Comments
 (0)