artintel235 commited on
Commit
d3efaea
·
verified ·
1 Parent(s): 10dce96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -5,10 +5,12 @@ import firebase_admin
5
  from firebase_admin import credentials, auth
6
  # Retrieve the JSON string from the secret
7
  json_str = os.getenv("FIREBASE_CREDENTIALS")
8
-
 
 
9
  # Initialize Firebase (only once)
10
  if not firebase_admin._apps:
11
- cred = credentials.Certificate("path/to/your/serviceAccountKey.json") # Replace with your Firebase service account key
12
  firebase_admin.initialize_app(cred)
13
 
14
  # Initialize session state
 
5
  from firebase_admin import credentials, auth
6
  # Retrieve the JSON string from the secret
7
  json_str = os.getenv("FIREBASE_CREDENTIALS")
8
+ # Retrieve the JSON string from the secret
9
+ json_str = os.getenv("FIREBASE_CREDENTIALS")
10
+ firebase_Creds = json.loads(json_str)
11
  # Initialize Firebase (only once)
12
  if not firebase_admin._apps:
13
+ cred = credentials.Certificate(firebase_Creds) # Replace with your Firebase service account key
14
  firebase_admin.initialize_app(cred)
15
 
16
  # Initialize session state