-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
30 lines (23 loc) · 1.1 KB
/
app.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
// Extract user credentials from URL parameters
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.8.0/firebase-app.js";
import { getDatabase,set,ref,update } from "https://www.gstatic.com/firebasejs/10.8.0/firebase-database.js";
import { getAuth, signOut } from "https://www.gstatic.com/firebasejs/10.8.0/firebase-auth.js";
const firebaseConfig = {
apiKey: "AIzaSyBAyJw-EzvrH4O1Il43sA-ceJoCkUxvUUE",
authDomain: "financeapp-29fd7.firebaseapp.com",
databaseURL: "https://financeapp-29fd7-default-rtdb.firebaseio.com",
projectId: "financeapp-29fd7",
storageBucket: "financeapp-29fd7.appspot.com",
messagingSenderId: "36688183901",
appId: "1:36688183901:web:9a11959af52cf8911403b4"
};
const app = initializeApp(firebaseConfig);
const auth = getAuth();
const signout = document.getElementById("logOut");
signout.addEventListener("click",(e)=>{
signOut(auth).then(() => {
window.location.href = "index.html";
}).catch((error) => {
alert(error);
});
});