-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.js
More file actions
24 lines (20 loc) · 788 Bytes
/
firebase.js
File metadata and controls
24 lines (20 loc) · 788 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
import firebase from "firebase/compat/app";
import "firebase/compat/firestore";
import "firebase/compat/auth";
const firebaseConfig = {
apiKey: "AIzaSyD4SfKLzLACzymJfboLHrMmX9R-6hoKOj8",
authDomain: "message-app-2d4f1.firebaseapp.com",
projectId: "message-app-2d4f1",
storageBucket: "message-app-2d4f1.appspot.com",
messagingSenderId: "258702029602",
appId: "1:258702029602:web:0fa6486eb2f94309f66b7b",
measurementId: "G-JBK7DD8BV3",
};
// Initialize Firebase
const app = !firebase.apps.length
? firebase.initializeApp(firebaseConfig)
: firebase.app();
const db = app.firestore(); // access to database
const auth = app.auth(); // access to authentication
const provider = new firebase.auth.GoogleAuthProvider(); // access to provider
export { db, auth, provider };