-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathfirebaseConfig.js
More file actions
31 lines (26 loc) · 1.5 KB
/
firebaseConfig.js
File metadata and controls
31 lines (26 loc) · 1.5 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
30
31
// 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
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyBziqda5Gv47CKTO3d7ShdcV3lP3M-ocFM",
authDomain: "learnfirebase-cf66d.firebaseapp.com",
projectId: "learnfirebase-cf66d",
storageBucket: "learnfirebase-cf66d.appspot.com",
messagingSenderId: "448075621583",
appId: "1:448075621583:web:79dfc732d37ded004603ba"
};
// 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);