From 1c0f991977f391f43497f6fce1aebb01ae1df22d Mon Sep 17 00:00:00 2001 From: Swapnil Date: Wed, 31 Jan 2024 12:01:28 +0530 Subject: [PATCH] added dummy.env for reference --- app/dummy.env | 6 ++++++ app/main.py | 13 +++++++------ job/dummy.env | 3 +++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 app/dummy.env create mode 100644 job/dummy.env diff --git a/app/dummy.env b/app/dummy.env new file mode 100644 index 0000000..6db22e3 --- /dev/null +++ b/app/dummy.env @@ -0,0 +1,6 @@ +CLIENT_ID= +CLIENT_SECRET= +REDIRECT_URI= +OPTIONAL_SCOPES= +DATABASE_URL= +APP_SECRET_KEY= \ No newline at end of file diff --git a/app/main.py b/app/main.py index 06749a2..e63552a 100644 --- a/app/main.py +++ b/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, } ) diff --git a/job/dummy.env b/job/dummy.env new file mode 100644 index 0000000..717a83c --- /dev/null +++ b/job/dummy.env @@ -0,0 +1,3 @@ +DATABASE_URL= +INOREADER_CLIENT_ID= +INOREADER_CLIENT_SECRET= \ No newline at end of file