diff --git a/functions/firebase-adminsdk-config.js b/functions/firebase-adminsdk-config.js index 7086b74..39cf30e 100644 --- a/functions/firebase-adminsdk-config.js +++ b/functions/firebase-adminsdk-config.js @@ -1,22 +1,17 @@ // Load environment variables from .env file -const path = require('path'); -const dotenv = require('dotenv'); - -// Specify the path to your .env file -const envPath = path.resolve(__dirname, '../.env'); -dotenv.config({ path: envPath }); +require('dotenv').config(); const serviceAccount = { "type": "service_account", - "project_id": process.env.FIREBASE_PROJECT_ID, - "private_key_id": process.env.FIREBASE_PRIVATE_KEY_ID, - "private_key": process.env.FIREBASE_PRIVATE_KEY, - "client_email": process.env.FIREBASE_CLIENT_EMAIL, - "client_id": process.env.FIREBASE_CLIENT_ID, - "auth_uri": process.env.FIREBASE_AUTH_URI, - "token_uri": process.env.FIREBASE_TOKEN_URI, - "auth_provider_x509_cert_url": process.env.FIREBASE_AUTH_PROVIDER_CERT_URL, - "client_x509_cert_url": process.env.FIREBASE_CLIENT_CERT_URL, + "project_id": process.env.MY_FIREBASE_PROJECT_ID, + "private_key_id": process.env.MY_FIREBASE_PRIVATE_KEY_ID, + "private_key": process.env.MY_FIREBASE_PRIVATE_KEY, + "client_email": process.env.MY_FIREBASE_CLIENT_EMAIL, + "client_id": process.env.MY_FIREBASE_CLIENT_ID, + "auth_uri": process.env.MY_FIREBASE_AUTH_URI, + "token_uri": process.env.MY_FIREBASE_TOKEN_URI, + "auth_provider_x509_cert_url": process.env.MY_FIREBASE_AUTH_PROVIDER_CERT_URL, + "client_x509_cert_url": process.env.MY_FIREBASE_CLIENT_CERT_URL, "universe_domain": "googleapis.com" };