-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* login fully complete * event machine types added * attendance upload and verify logic added * add attendance working with database * add event working, core version ready * the most import edge case is taken care of * github actions workflow setup for cloud run * github actions workflow setup for cloud run #2 * ignored build errors, CHANGE LATER * ignored build errors, CHANGE LATER #1 * staging and prod build seperated * leaked key removed and secrets added * leaked key removed and secrets added #2 * leaked key removed and secrets added #3 * leaked key removed and secrets added #4 * leaked key removed and secrets added #5 * leaked key removed and secrets added #6 * leaked key removed and secrets added #7 * leaked key removed and secrets added #8 * leave it * leaked key removed and secrets added #8
- Loading branch information
1 parent
ede7152
commit d23622e
Showing
3 changed files
with
67 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
// Import the functions you need from the SDKs you need | ||
import { initializeApp } from "firebase/app"; | ||
import {getFirestore} from "firebase/firestore" | ||
import {getAuth} from "firebase/auth" | ||
import { getFirestore } from "firebase/firestore"; | ||
import { getAuth } from "firebase/auth"; | ||
// TODO: Add SDKs for Firebase products that you want to use | ||
// https://firebase.google.com/docs/web/setup#available-libraries | ||
|
||
// Your web app's Firebase configuration | ||
const firebaseConfig = { | ||
apiKey: "AIzaSyDvyg0ymLOqs181XfDZ2VxvuAEqDcvZrOI", | ||
authDomain: "aicte-diary.firebaseapp.com", | ||
projectId: "aicte-diary", | ||
storageBucket: "aicte-diary.appspot.com", | ||
messagingSenderId: "944319415450", | ||
appId: "1:944319415450:web:3e453ecb0786bde4f68b23" | ||
}; | ||
|
||
console.log("prod env ", process.env.NODE_ENV); | ||
let firebaseConfig = {}; | ||
// if (process.env.NODE_ENV === "production") { | ||
// console.log("here is the node env") | ||
// firebaseConfig = { | ||
// apiKey: process.env.FIREBASE_API_KEY, | ||
// authDomain: "aicte-diary.firebaseapp.com", | ||
// projectId: "aicte-diary", | ||
// storageBucket: "aicte-diary.appspot.com", | ||
// messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID, | ||
// appId: process.env.FIREBASE_APP_ID, | ||
// }; | ||
// } | ||
if (process.env.NODE_ENV === "production") { | ||
console.log("here is the node env") | ||
firebaseConfig = { | ||
apiKey: "AIzaSyDvyg0ymLOqs181XfDZ2VxvuAEqDcvZrOI", | ||
authDomain: "aicte-diary.firebaseapp.com", | ||
projectId: "aicte-diary", | ||
storageBucket: "aicte-diary.appspot.com", | ||
messagingSenderId: "944319415450", | ||
appId: "1:944319415450:web:7598324a715c03c1f68b23", | ||
}; | ||
} | ||
else { | ||
firebaseConfig = { | ||
apiKey: "process.env.NEXT_PUBLIC_FIREBASE_API_KEY", | ||
authDomain: "aicte-diary.firebaseapp.com", | ||
projectId: "aicte-diary", | ||
storageBucket: "aicte-diary.appspot.com", | ||
messagingSenderId: process.env.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID, | ||
appId: process.env.NEXT_PUBLIC_FIREBASE_APP_ID, | ||
}; | ||
} | ||
|
||
// Initialize Firebase | ||
const app = initializeApp(firebaseConfig); | ||
export const firedb = getFirestore(app) | ||
export const auth = getAuth(app) | ||
export const firedb = getFirestore(app); | ||
export const auth = getAuth(app); |