-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebaseConfig.js
More file actions
22 lines (19 loc) · 826 Bytes
/
Copy pathfirebaseConfig.js
File metadata and controls
22 lines (19 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { initializeApp } from "firebase/app";
import { getFirestore } from "firebase/firestore";
import { initializeAuth, getReactNativePersistence } from "firebase/auth";
import ReactNativeAsyncStorage from "@react-native-async-storage/async-storage";
const firebaseConfig = {
apiKey: process.env.EXPO_PUBLIC_apiKey,
authDomain: process.env.EXPO_PUBLIC_authDomain,
projectId: process.env.EXPO_PUBLIC_projectId,
storageBucket: process.env.EXPO_PUBLIC_storageBucket,
messagingSenderId: process.env.EXPO_PUBLIC_messagingSenderId,
appId: process.env.EXPO_PUBLIC_appId,
measurementId: process.env.EXPO_PUBLIC_measurementId,
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
initializeAuth(app, {
persistence: getReactNativePersistence(ReactNativeAsyncStorage),
});
export { app, db };