Skip to content

Commit 0b1e902

Browse files
authored
Merge pull request #49 from AzureAD/remove-secret
Avoid hardcoding secret
2 parents 95b59f7 + b56a384 commit 0b1e902

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
}
1414
1515
You can then run this sample with a JSON configuration file:
16-
python sample.py parameters.json
17-
On the browser open http://localhost:5000/
16+
17+
python sample.py parameters.json your_flask_session_secret_here
18+
19+
And the on the browser open http://localhost:5000/
1820
1921
"""
2022

@@ -29,7 +31,7 @@
2931

3032
app = flask.Flask(__name__)
3133
app.debug = True
32-
app.secret_key = 'development'
34+
app.secret_key = sys.argv[2] # In this demo, we expect a secret from 2nd CLI param
3335

3436

3537
# Optional logging

0 commit comments

Comments
 (0)