-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.js
More file actions
23 lines (22 loc) · 881 Bytes
/
firebase.js
File metadata and controls
23 lines (22 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { initializeApp } from "firebase/app";
import { getFirestore } from "@firebase/firestore";
import { getDatabase } from 'firebase/database';
import { getAuth, onAuthStateChanged } from "firebase/auth";
const firebaseConfig = {
apiKey: "AIzaSyDVSYjKuKufYKgOWhHm3eCVo3r9crfLJhY",
authDomain: "learnfirebox-bb521.firebaseapp.com",
databaseURL: "https://learnfirebox-bb521-default-rtdb.firebaseio.com",
projectId: "learnfirebox-bb521",
storageBucket: "learnfirebox-bb521.appspot.com",
messagingSenderId: "205350957637",
appId: "1:205350957637:web:fd5ae0ca681489e67de92c",
};
// if (!firebase.apps.length) {
// firebase.initializeApp(clientCredentials);
// }
const app = initializeApp(firebaseConfig);
const auth = getAuth();
const database = getDatabase(app);
export { database };
export const firestore = getFirestore(app);
export { auth, onAuthStateChanged };