Skip to content

Commit e6ca27c

Browse files
committed
Reorder config vars + comment edit
1 parent f8249a3 commit e6ca27c

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

app_config.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import os
22

3-
CLIENT_SECRET = "Enter_the_Client_Secret_Here" # Our Quickstart uses this placeholder
4-
# In your production app, we recommend you to use other ways to store your secret,
5-
# such as KeyVault, or environment variable as described in Flask's documentation here
3+
CLIENT_ID = "Enter_the_Application_Id_here" # Application (client) ID of app registration
4+
5+
CLIENT_SECRET = "Enter_the_Client_Secret_Here" # Placeholder - for use ONLY during testing.
6+
# In a production app, we recommend you use a more secure method of storing your secret,
7+
# like Azure Key Vault. Or, use an environment variable as described in Flask's documentation:
68
# https://flask.palletsprojects.com/en/1.1.x/config/#configuring-from-environment-variables
79
# CLIENT_SECRET = os.getenv("CLIENT_SECRET")
810
# if not CLIENT_SECRET:
@@ -11,10 +13,9 @@
1113
AUTHORITY = "https://login.microsoftonline.com/common" # For multi-tenant app
1214
# AUTHORITY = "https://login.microsoftonline.com/Enter_the_Tenant_Name_Here"
1315

14-
CLIENT_ID = "Enter_the_Application_Id_here"
15-
16-
REDIRECT_PATH = "/getAToken" # It will be used to form an absolute URL
17-
# And that absolute URL must match your app's redirect_uri set in AAD
16+
REDIRECT_PATH = "/getAToken" # Used for forming an absolute URL to your redirect URI.
17+
# The absolute URL must match the redirect URI you set
18+
# in the app's registration in the Azure portal.
1819

1920
# You can find more Microsoft Graph API endpoints from Graph Explorer
2021
# https://developer.microsoft.com/en-us/graph/graph-explorer
@@ -24,5 +25,4 @@
2425
# https://docs.microsoft.com/en-us/graph/permissions-reference
2526
SCOPE = ["User.ReadBasic.All"]
2627

27-
SESSION_TYPE = "filesystem" # So token cache will be stored in server-side session
28-
28+
SESSION_TYPE = "filesystem" # Specifies the token cache should be stored in server-side session

app_config_b2c.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
resetpassword_user_flow = "b2c_1_passwordreset1"
77
authority_template = "https://{tenant}.b2clogin.com/{tenant}.onmicrosoft.com/{user_flow}"
88

9-
CLIENT_SECRET = "Enter_the_Client_Secret_Here" # Our Quickstart uses this placeholder
10-
# In your production app, we recommend you to use other ways to store your secret,
11-
# such as KeyVault, or environment variable as described in Flask's documentation here
9+
CLIENT_ID = "Enter_the_Application_Id_here" # Application (client) ID of app registration
10+
11+
CLIENT_SECRET = "Enter_the_Client_Secret_Here" # Placeholder - for use ONLY during testing.
12+
# In a production app, we recommend you use a more secure method of storing your secret,
13+
# like Azure Key Vault. Or, use an environment variable as described in Flask's documentation:
1214
# https://flask.palletsprojects.com/en/1.1.x/config/#configuring-from-environment-variables
1315
# CLIENT_SECRET = os.getenv("CLIENT_SECRET")
1416
# if not CLIENT_SECRET:
@@ -21,16 +23,14 @@
2123
B2C_RESET_PASSWORD_AUTHORITY = authority_template.format(
2224
tenant=b2c_tenant, user_flow=resetpassword_user_flow)
2325

24-
CLIENT_ID = "Enter_the_Application_Id_here"
25-
26-
REDIRECT_PATH = "/getAToken" # It will be used to form an absolute URL
27-
# And that absolute URL must match your app's redirect_uri set in AAD
28-
29-
# This is the resource that you are going to access in your B2C tenant
30-
ENDPOINT = ''
26+
REDIRECT_PATH = "/getAToken" # Used for forming an absolute URL to your redirect URI.
27+
# The absolute URL must match the redirect URI you set
28+
# in the app's registration in the Azure portal.
3129

32-
# These are the scopes that you defined for the web API
33-
SCOPE = [] # For illustration purposes only: ["demo.read", "demo.write"]
30+
# This is the API resource endpoint
31+
ENDPOINT = '' # Application ID URI of app registration in Azure portal
3432

35-
SESSION_TYPE = "filesystem" # So token cache will be stored in server-side session
33+
# These are the scopes you've exposed in the web API app registration in the Azure portal
34+
SCOPE = [] # Example with two exposed scopes: ["demo.read", "demo.write"]
3635

36+
SESSION_TYPE = "filesystem" # Specifies the token cache should be stored in server-side session

0 commit comments

Comments
 (0)