Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|
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
|