-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.js
More file actions
29 lines (24 loc) · 1.02 KB
/
Copy pathfirebase.js
File metadata and controls
29 lines (24 loc) · 1.02 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
// Import the functions you need from the SDKs you need
import { initializeApp, getApps, getApp } from "firebase/app";
import { getAuth, GoogleAuthProvider } from "firebase/auth";
import { getFirestore } from "firebase/firestore";
import { getStorage } from "firebase/storage";
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyAYj_yBXWa_iMJ7laAeuZWuAyho6pEY7Gs",
authDomain: "joshuawork-3c336.firebaseapp.com",
projectId: "joshuawork-3c336",
storageBucket: "joshuawork-3c336.appspot.com",
messagingSenderId: "746981180889",
appId: "1:746981180889:web:814a5ef16b58d30c7b45c8",
};
// Initialize Firebase
//const app = initializeApp(firebaseConfig);
const app = !getApps().length ? initializeApp(firebaseConfig) : getApp();
const db = getFirestore(app);
// Initialize Firebase Authentication and get a reference to the service
const auth = getAuth(app);
const storage = getStorage(app);
// Sign in using a popup.
const provider = new GoogleAuthProvider();
export { db, auth, provider, storage };