-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.js
More file actions
32 lines (24 loc) · 825 Bytes
/
firebase.js
File metadata and controls
32 lines (24 loc) · 825 Bytes
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
26
27
28
29
30
31
32
import * as firebase from 'firebase/compat';
import "firebase/firestore";
import "firebase/auth";
import { getStorage } from "firebase/storage";
import { GoogleAuthProvider, signInWithPopup } from "firebase/auth";
const firebaseConfig = {
apiKey: "AIzaSyCQlilRnBsIdsz7Q0l4u5dCd8F0JIXXA9c",
authDomain: "signal-clone-73a18.firebaseapp.com",
projectId: "signal-clone-73a18",
storageBucket: "signal-clone-73a18.appspot.com",
messagingSenderId: "506226393944",
appId: "1:506226393944:web:bea88ae525dbeb82b15b2d"
};
let app;
if(firebase.apps.length == 0){
app = firebase.initializeApp(firebaseConfig);
} else {
app = firebase.app();
}
const db = app.firestore();
const auth = firebase.auth();
// const storage = firebase.storage();
const storage = getStorage(app);
export { db, auth, storage };