forked from chelseafarley/ToDoApp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
firebase.js
40 lines (36 loc) · 1.23 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
39
40
import { initializeApp } from "firebase/app";
// import { getAuth } from "firebase/auth";
import { getFirestore } from "firebase/firestore"
import AsyncStorage from '@react-native-async-storage/async-storage';
import {
initializeAuth,
getReactNativePersistence
} from 'firebase/auth/react-native';
const firebaseConfig = {
// apiKey: "AIzaSyDaUitBcy17bNrIUZ1l5bI3yBkyAF_lSps",
// authDomain: "todoapp-cc8ba.firebaseapp.com",
// projectId: "todoapp-cc8ba",
// storageBucket: "todoapp-cc8ba.appspot.com",
// messagingSenderId: "327285561962",
// appId: "1:327285561962:web:afdbd615b7eb492b2f0813",
// measurementId: "G-YEJX4F991Q"
apiKey: "AIzaSyAphI8yenvlEMXs3onn7nmrY1rtqIl95eY",
authDomain: "bate-e7b13.firebaseapp.com",
databaseURL: "https://bate-e7b13-default-rtdb.asia-southeast1.firebasedatabase.app",
projectId: "bate-e7b13",
storageBucket: "bate-e7b13.appspot.com",
messagingSenderId: "472837828353",
appId: "1:472837828353:web:a3604fb6a58ed891177500",
measurementId: "G-CYG58XMGM9"
};
const app = initializeApp(firebaseConfig);
//const auth = getAuth();
// initialize auth
const auth = initializeAuth(app, {
persistence: getReactNativePersistence(AsyncStorage)
});
const db = getFirestore();
export {
auth,
db
}