blob: 8bb5e7cd4a6da6c951bc70f7aa7650b9372a676b (
plain)
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
|
// src/shared/lib/firebase/config.ts
import { initializeApp, getApps, getApp } from 'firebase/app';
import {
initializeAuth,
getReactNativePersistence,
} from 'firebase/auth';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { getFirestore } from 'firebase/firestore';
const firebaseConfig = {
apiKey: 'AIzaSyANl7xew69Y39IH1PrRL6rBbWs6qDgz7qM',
authDomain: 'appoficinas-f8c8d.firebaseapp.com',
projectId: 'appoficinas-f8c8d',
storageBucket: 'appoficinas-f8c8d.firebasestorage.app',
messagingSenderId: '734167380764',
appId: '1:734167380764:web:44ca60953f0624edc300d9',
};
const app = getApps().length ? getApp() : initializeApp(firebaseConfig);
export const auth = initializeAuth(app, {
persistence: getReactNativePersistence(AsyncStorage),
});
export const db = getFirestore(app);
export default app;
|