-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirebaseConfig.js
30 lines (25 loc) · 1.38 KB
/
firebaseConfig.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
// get firebase modules via Javascript SDK
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.5.2/firebase-app.js";
import { getAuth } from "https://www.gstatic.com/firebasejs/10.5.2/firebase-auth.js";
import { getFirestore } from "https://www.gstatic.com/firebasejs/10.5.2/firebase-firestore.js";
// apiKey: Public API key to interact with Firebase services
// authDomain: URL used for user authentication services
// projectId: Project ID for your Firebase application
// storageBucket: URL for file storage within your application
// messagingSenderId: Sender ID for sending messages via Firebase Cloud Messaging
// appId: Application ID for the Firebase app, it is unique to this application
// STEP 1: Declare Firebase Environment Variables
const firebaseConfig = {
apiKey: "YOUR-OWN-VARIABLE",
authDomain: "YOUR-OWN-VARIABLE",
projectId: "YOUR-OWN-VARIABLE",
storageBucket: "YOUR-OWN-VARIABLE",
messagingSenderId: "YOUR-OWN-VARIABLE",
appId: "YOUR-OWN-VARIABLE",
};
// initialze firebase in our project by passing in our environment variables to the `initializeApp` method
const app = initializeApp(firebaseConfig);
// initialze firebase authentication by passing in firebase `app` instance we delared on the line above
export const auth = getAuth(app);
// initialze firestore by passing in firebase `app` instance we delared
export const db = getFirestore(app);