-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirebase.js
43 lines (37 loc) · 1.31 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
41
42
43
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
// import { getAuth } from "firebase/auth";
import {
getAuth,
initializeAuth,
getReactNativePersistence,
} from "firebase/auth";
import ReactNativeAsyncStorage from "@react-native-async-storage/async-storage";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyBIZJY-S4tV5ynUOrp_gVu0_SWZS7Gfe_E",
authDomain: "word-smith-app.firebaseapp.com",
projectId: "word-smith-app",
storageBucket: "word-smith-app.appspot.com",
messagingSenderId: "214894842663",
appId: "1:214894842663:web:d78a6e16f28ce50360cf02",
measurementId: "G-5KK5M5X2K3",
};
// let app;
// const auth = initializeAuth(app, {
// persistence: getReactNativePersistence(ReactNativeAsyncStorage),
// });
// Initialize Firebase
export const FIREBASE_APP = initializeApp(firebaseConfig);
export const FIREBASE_AUTH = getAuth(FIREBASE_APP);
//
// if (firebase.apps.length === 0) {
// app = firebase.initializeApp(firebaseConfig);
// } else {
// app = firebase.app();
// }
// const auth = firebase.auth();
// export { auth };