Skip to content

Commit

Permalink
Move .env under /functions and change prefix as google already reserv…
Browse files Browse the repository at this point in the history
…ed it
  • Loading branch information
Irenej Bozovicar committed Jan 8, 2024
1 parent 119376a commit 1339fef
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions functions/firebase-adminsdk-config.js
Original file line number Diff line number Diff line change
@@ -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"
};

Expand Down

0 comments on commit 1339fef

Please sign in to comment.