-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
77 additions
and
53 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,24 +1,28 @@ | ||
import { initializeApp } from "firebase/app"; | ||
import { initializeApp } from "firebase/app"; // Initialize Firebase app first | ||
import { getAuth, GoogleAuthProvider, FacebookAuthProvider } from "firebase/auth"; | ||
import { getFirestore } from "firebase/firestore"; // استيراد Firestore | ||
import { getFirestore } from "firebase/firestore"; | ||
import { getDatabase } from "firebase/database"; // For Realtime Database | ||
|
||
// Firebase configuration object | ||
const firebaseConfig = { | ||
apiKey: "AIzaSyDc1iS4NX2um7sqJuYRSll9Il_7V6g6LsE", | ||
authDomain: "graduatinproject.firebaseapp.com", | ||
projectId: "graduatinproject", | ||
storageBucket: "graduatinproject.appspot.com", // تأكد من صحة الـ storageBucket | ||
storageBucket: "graduatinproject.appspot.com", | ||
messagingSenderId: "361149223809", | ||
appId: "1:361149223809:web:58467e248f81422f97ce80", | ||
measurementId: "G-NRG6TMTB8Q", | ||
databaseURL: "https://graduatinproject-default-rtdb.europe-west1.firebasedatabase.app", // Add this line | ||
}; | ||
|
||
// Initialize Firebase | ||
// Initialize Firebase app | ||
const app = initializeApp(firebaseConfig); | ||
|
||
// Get Firebase services | ||
// Now initialize Firebase services (auth, firestore, etc.) | ||
const auth = getAuth(app); | ||
const googleProvider = new GoogleAuthProvider(); | ||
const facebookProvider = new FacebookAuthProvider(); | ||
const db = getFirestore(app); // تهيئة Firestore | ||
const db = getFirestore(app); // Firestore | ||
const realTimeDb = getDatabase(app); // Realtime Database | ||
|
||
export { auth, googleProvider, facebookProvider, db }; // تصدير auth و db و المزودين | ||
export { auth, googleProvider, facebookProvider, db, realTimeDb }; |