-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebaseConfig.js
More file actions
31 lines (26 loc) · 908 Bytes
/
firebaseConfig.js
File metadata and controls
31 lines (26 loc) · 908 Bytes
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
import { initializeApp } from "firebase/app";
import { getAuth, signInAnonymously } from "firebase/auth";
import { getFirestore, collection, doc, setDoc, addDoc } from "firebase/firestore";
const firebaseConfig = {
apiKey: "AIzaSyALcDd8vkoQ4zZ4fWCJ2ZkMwfhOUhREoIA",
authDomain: "sealme-fb2f9.firebaseapp.com",
databaseURL: "https://sealme-fb2f9-default-rtdb.firebaseio.com",
projectId: "sealme-fb2f9",
storageBucket: "sealme-fb2f9.firebasestorage.app",
messagingSenderId: "23725280102",
appId: "1:23725280102:web:b5595ed617115f376d16a7"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
const db = getFirestore(app);
function anonymouslySignIn(){
signInAnonymously(auth)
.then(() => {
console.log("User signed in anonymously");
})
.catch((error) => {
console.error("Error during anonymous sign-in:", error);
});
}
export {db}