-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirebase.js
38 lines (31 loc) · 1.1 KB
/
firebase.js
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
33
34
35
36
37
38
// Import the functions you need from the SDKs you need
//import { initializeApp } from "firebase/app";
//import { getAnalytics } from "firebase/analytics";
import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/firestore';
//import * as FirebaseCore from 'expo-firebase-core';
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
//htttp
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyBF5rOgLt6jZ_mYA7QegdemPiDDWW81htc",
authDomain: "blink-733cb.firebaseapp.com",
projectId: "blink-733cb",
storageBucket: "blink-733cb.appspot.com",
messagingSenderId: "1085065303623",
appId: "1:1085065303623:web:d2094d3adeddb8f9d98362",
measurementId: "G-BY2BQKLX65"
};
// Initialize Firebase
let app;
if (firebase.apps.length === 0) {
app = firebase.initializeApp(firebaseConfig);
} else {
app = firebase.app()
}
const db = app.firestore();
const auth = firebase.auth();
export { db, auth };