-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirebase.js
40 lines (33 loc) · 1.2 KB
/
firebase.js
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
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import {
createUserWithEmailAndPassword,
getAuth,
signInWithEmailAndPassword,
} from "firebase/auth";
import { getStorage } from "firebase/storage";
import { initializeFirestore } from "firebase/firestore";
// 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: "AIzaSyAfjiA6ihRiJ4eKcuPzhXktOTsnMqQ-S2o",
authDomain: "kludschatup.firebaseapp.com",
projectId: "kludschatup",
storageBucket: "kludschatup.appspot.com",
messagingSenderId: "588867529674",
appId: "1:588867529674:web:eeb1814a703075d6067d33",
};
// Initialize Firebase
export const app = initializeApp(firebaseConfig);
export const auth = getAuth(app);
export const storage = getStorage(app);
export const db = initializeFirestore(app, {
experimentalForceLongPolling: true,
});
export function signIn(email, password) {
return signInWithEmailAndPassword(auth, email, password);
}
export function signUp(email, password) {
return createUserWithEmailAndPassword(auth, email, password);
}