Skip to content

Commit

Permalink
fixed bugs in apis
Browse files Browse the repository at this point in the history
  • Loading branch information
IshavSohal committed Dec 16, 2023
1 parent e29c612 commit 4c41186
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion backend/utils/FirebaseAPI.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# from typing import Optional
import os
from typing import Optional
import firebase_admin
from firebase_admin import credentials, auth

from models.user import User
from mongodb_api.carbon_track_db import CarbonTrackDB

cred = credentials.Certificate("secrets.json")
firebase_cert = {
"type": os.environ.get("type"),
"project_id": os.environ.get("project_id"),
"private_key_id": os.environ.get("private_key_id"),
"private_key": os.environ.get("private_key"),
"client_email": os.environ.get("client_email"),
"client_id": os.environ.get("client_id"),
"auth_uri": os.environ.get("auth_uri"),
"token_uri": os.environ.get("token_uri"),
"auth_provider_x509_cert_url": os.environ.get("auth_provider_x509_cert_url"),
"client_x509_cert_url": os.environ.get("client_x509_cert_url"),
"universe_domain": os.environ.get("universe_domain")
}

cred = credentials.Certificate(firebase_cert)
APP = firebase_admin.initialize_app(cred)


Expand Down

0 comments on commit 4c41186

Please sign in to comment.