-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase-config.js
More file actions
35 lines (31 loc) · 1.05 KB
/
firebase-config.js
File metadata and controls
35 lines (31 loc) · 1.05 KB
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
// Import the functions you need from the SDKs you need
import { initializeApp } from 'firebase/app';
import { initializeAuth } from 'firebase/auth';
import { getReactNativePersistence } from "firebase/auth/react-native";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { getFirestore } from 'firebase/firestore';
import { getStorage } from 'firebase/storage';
import {
FIREBASE_APIKEY,
FIREBASE_AUTHDOMAIN,
FIREBASE_PROJECTID,
FIREBASE_STORAGEBUCKET,
FIREBASE_MESSAGEINGSENDERID,
FIREBASE_APPID,
} from '@env';
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: FIREBASE_APIKEY,
authDomain: FIREBASE_AUTHDOMAIN,
projectId: FIREBASE_PROJECTID,
storageBucket: FIREBASE_STORAGEBUCKET,
messagingSenderId: FIREBASE_MESSAGEINGSENDERID,
appId: FIREBASE_APPID,
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
export const auth = initializeAuth(app, {
persistence: getReactNativePersistence(AsyncStorage)
});
export const db = getFirestore(app);
export const storage = getStorage(app)