Separate services - app, db, and job #1
6
app/dummy.env
Normal file
6
app/dummy.env
Normal file
|
@ -0,0 +1,6 @@
|
|||
CLIENT_ID=
|
||||
CLIENT_SECRET=
|
||||
REDIRECT_URI=
|
||||
OPTIONAL_SCOPES=
|
||||
DATABASE_URL=
|
||||
APP_SECRET_KEY=
|
13
app/main.py
13
app/main.py
|
@ -13,6 +13,7 @@ app = Flask(__name__)
|
|||
|
||||
# Read environment variables outside the route function
|
||||
client_id = get_env_variable('CLIENT_ID')
|
||||
client_secret = get_env_variable('CLIENT_SECRET')
|
||||
redirect_uri = get_env_variable('REDIRECT_URI')
|
||||
optional_scopes = get_env_variable('OPTIONAL_SCOPES')
|
||||
database_url = get_env_variable('DATABASE_URL')
|
||||
|
@ -67,9 +68,9 @@ def oauth_redirect():
|
|||
# },
|
||||
# data={
|
||||
# 'code': auth_code,
|
||||
# 'redirect_uri': get_env_variable('REDIRECT_URI'),
|
||||
# 'client_id': get_env_variable('CLIENT_ID'),
|
||||
# 'client_secret': get_env_variable('CLIENT_SECRET'),
|
||||
# 'redirect_uri': redirect_uri,
|
||||
# 'client_id': client_id,
|
||||
# 'client_secret': client_secret,
|
||||
# 'scope': '',
|
||||
# 'grant_type': 'authorization_code'
|
||||
# }
|
||||
|
@ -83,9 +84,9 @@ def oauth_redirect():
|
|||
},
|
||||
data={
|
||||
'code': auth_code,
|
||||
'redirect_uri': get_env_variable('REDIRECT_URI'),
|
||||
'client_id': get_env_variable('CLIENT_ID'),
|
||||
'client_secret': get_env_variable('CLIENT_SECRET')
|
||||
'redirect_uri': redirect_uri,
|
||||
'client_id': client_id,
|
||||
'client_secret': client_secret,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
3
job/dummy.env
Normal file
3
job/dummy.env
Normal file
|
@ -0,0 +1,3 @@
|
|||
DATABASE_URL=
|
||||
INOREADER_CLIENT_ID=
|
||||
INOREADER_CLIENT_SECRET=
|
Loading…
Reference in New Issue
Block a user