mirror of
https://github.com/th30d4y/OpenLearnX.git
synced 2026-05-26 11:25:49 +00:00
22 lines
788 B
TypeScript
22 lines
788 B
TypeScript
// lib/firebase.ts
|
|
import { initializeApp, getApps, getApp } from "firebase/app"
|
|
import { getAuth } from "firebase/auth"
|
|
// import { getAnalytics } from "firebase/analytics"; // Analytics can be initialized if needed
|
|
|
|
const firebaseConfig = {
|
|
apiKey: "***************************************",
|
|
authDomain: "*************************************",
|
|
projectId: "************",
|
|
storageBucket: "************************************",
|
|
messagingSenderId: "************",
|
|
appId: "**********************************************",
|
|
measurementId: "************",
|
|
}
|
|
|
|
// Initialize Firebase
|
|
const app = !getApps().length ? initializeApp(firebaseConfig) : getApp()
|
|
const auth = getAuth(app)
|
|
// const analytics = getAnalytics(app); // Uncomment if you need analytics
|
|
|
|
export { app, auth }
|