-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirebase.ts
33 lines (29 loc) · 970 Bytes
/
firebase.ts
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
// Import the functions you need from the SDKs you need
import {
FIREBASE_API_KEY,
FIREBASE_APP_ID,
FIREBASE_AUTH_DOMAIN,
FIREBASE_MESSAGING_SENDER_ID,
FIREBASE_PROJECT_ID,
FIREBASE_STORAGE_BUCKET
} from "@/utils/constants/globalConstants";
import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";
import "firebase/auth";
import "firebase/functions";
import "firebase/firestore";
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: FIREBASE_API_KEY,
authDomain: FIREBASE_AUTH_DOMAIN,
projectId: FIREBASE_PROJECT_ID,
storageBucket: FIREBASE_STORAGE_BUCKET,
messagingSenderId: FIREBASE_MESSAGING_SENDER_ID,
appId: FIREBASE_APP_ID
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
// Initialize Firebase Authentication and get a reference to the service
export const auth = getAuth(app);
export default app;