Skip to content

Commit

Permalink
firebase config updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Souviksamanta34 committed Oct 14, 2024
1 parent 719d88f commit 62dc4d0
Show file tree
Hide file tree
Showing 3 changed files with 212 additions and 11 deletions.
201 changes: 201 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"axios-retry": "^4.5.0",
"css-select": "^5.1.0",
"firebase": "^10.14.0",
"google-auth-library": "^9.14.2",
"gruham": "file:",
"moment": "^2.30.1",
"normalize.css": "^8.0.1",
Expand Down
21 changes: 10 additions & 11 deletions src/firebase.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getAnalytics } from "firebase/analytics";
// Import Firebase dependencies from compat
import firebase from "firebase/compat/app";
import "firebase/compat/auth";
import "firebase/compat/storage";
import "firebase/compat/firestore";

// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyA5o3SBkvA_-MBNqwkPLGlmcmYQWAlZUj8",
authDomain: "gruham-eb94a.firebaseapp.com",
Expand All @@ -18,13 +15,15 @@ const firebaseConfig = {
measurementId: "G-DPRH81RTJ7"
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);

// Initialize Firebase using compat
const firebaseApp = firebase.initializeApp(firebaseConfig);

const db = firebase.firestore();
const auth = firebase.auth();
// Initialize services
const db = firebaseApp.firestore();
const auth = firebaseApp.auth();
const provider = new firebase.auth.GoogleAuthProvider();

// Optionally, you can add analytics like this if needed, but it's not required
// const analytics = firebaseApp.analytics();

export { db, auth };
export { auth, db, provider };

0 comments on commit 62dc4d0

Please sign in to comment.