File size: 929 Bytes
473db3d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { initializeApp, getApps, getApp } from "firebase/app";
import { getAuth, GoogleAuthProvider } from "firebase/auth";
import { getFirestore } from "firebase/firestore";

// Your web app's Firebase configuration
const firebaseConfig = {
  apiKey: "AIzaSyApTrpWfOUyrlVx1YMrfqwToz48RSPB41A",
  authDomain: "scrapi-7a8d0.firebaseapp.com",
  projectId: "scrapi-7a8d0",
  storageBucket: "scrapi-7a8d0.firebasestorage.app",
  messagingSenderId: "491054539000",
  appId: "1:491054539000:web:0d10030114fee51a511b0d"
};

// Initialize Firebase
// Uses getApps() to check if the app is already initialized (prevents errors in Next.js dev mode)
const app = !getApps().length ? initializeApp(firebaseConfig) : getApp();

// Initialize services
export const auth = getAuth(app);
export const googleProvider = new GoogleAuthProvider();
export const db = getFirestore(app); // Included in case your app uses Firestore

export default app;