-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.js
More file actions
80 lines (62 loc) · 2.1 KB
/
firebase.js
File metadata and controls
80 lines (62 loc) · 2.1 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Import the functions you need from the SDKs you need
import * as firebase from 'firebase';
// 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
const firebaseConfig = {
apiKey: "AIzaSyBp0e3GoP6hUWxguHFw6AmNyH9cBGyN_G4",
authDomain: "rnvetapp.firebaseapp.com",
projectId: "rnvetapp",
storageBucket: "rnvetapp.appspot.com",
messagingSenderId: "1081044385929",
appId: "1:1081044385929:web:3dbc81d482f7110d2b8658"
};
// Initialize Firebase
let app;
if(firebase.apps.length === 0){
app = firebase.initializeApp(firebaseConfig);
} else{
app = firebase.app()
}
const auth = firebase.auth()
export { auth };
/**************************/
/*
import firebase from 'firebase/compat/app'; // Importa la versión compatible (compat) de Firebase
import 'firebase/compat/auth';
import 'firebase/compat/firestore';
const firebaseConfig = {
apiKey: "AIzaSyBp0e3GoP6hUWxguHFw6AmNyH9cBGyN_G4",
authDomain: "rnvetapp.firebaseapp.com",
projectId: "rnvetapp",
storageBucket: "rnvetapp.appspot.com",
messagingSenderId: "1081044385929",
appId: "1:1081044385929:web:3dbc81d482f7110d2b8658"
};
// Inicializa Firebase con la configuración
firebase.initializeApp(firebaseConfig);
const auth = firebase.auth();
const db = firebase.firestore();
export { auth, db };
*/
/**************************/
/*
import { initializeApp } from 'firebase/app';
import { getAuth } from 'firebase/auth';
import { getDatabase } from 'firebase/database';
// Your Firebase project configuration
const firebaseConfig = {
apiKey: "AIzaSyBp0e3GoP6hUWxguHFw6AmNyH9cBGyN_G4",
authDomain: "rnvetapp.firebaseapp.com",
projectId: "rnvetapp",
storageBucket: "rnvetapp.appspot.com",
messagingSenderId: "1081044385929",
appId: "1:1081044385929:web:3dbc81d482f7110d2b8658"
};
// Initialize Firebase
const firebaseApp = initializeApp(firebaseConfig);
// Get Firebase Authentication and Database instances
const auth = getAuth(firebaseApp);
const db = getDatabase(firebaseApp);
export { auth, db };
*/