Skip to content

Commit

Permalink
deserialize key
Browse files Browse the repository at this point in the history
  • Loading branch information
rugeli committed Jan 19, 2024
1 parent c81a98c commit 4e16de0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cellpack/autopack/FirebaseHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,16 @@ def get_dev_creds():

@staticmethod
def get_staging_creds():
# use override=True to refresh .env in case software updates affect env variables loading
load_dotenv(dotenv_path="./.env", override=True)
# set override=True to refresh the .env file if softwares or tokens updated
load_dotenv(dotenv_path="./.env", override=False)
FIREBASE_TOKEN = os.getenv("FIREBASE_TOKEN")
firebase_key = FIREBASE_TOKEN.replace("\\n", "\n")
FIREBASE_EMAIL = os.getenv("FIREBASE_EMAIL")
return {
"type": "service_account",
"project_id": "cell-pack-database",
"client_email": FIREBASE_EMAIL,
"private_key": FIREBASE_TOKEN,
"private_key": firebase_key,
"token_uri": "https://oauth2.googleapis.com/token",
}

Expand Down

0 comments on commit 4e16de0

Please sign in to comment.