-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
94 lines (74 loc) · 2.58 KB
/
index.html
File metadata and controls
94 lines (74 loc) · 2.58 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1 id="h1">Hlo</h1>
<form id="form" action="">
<input id="email" type="text">
<br>
<input id="pass" type="text">
<br>
<button id="Sub">Submit</button>
<h1 id="h1">Sign in</h1>
<form id="form1" action="">
<input id="email_1" type="text">
<br>
<input id="pass_1" type="text">
<br>
<button id="Sub_1">Sign in</button>
</form>
</body>
<!--
<script type="module">
// Import the functions you need from the SDKs you need
console.log('hi');
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.4.0/firebase-app.js";
import { getAnalytics } from "https://www.gstatic.com/firebasejs/10.4.0/firebase-analytics.js";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyDD4PiP8lNMSCEFxVnijuQ1G3SG1dfWmeo",
authDomain: "webathon-327a7.firebaseapp.com",
projectId: "webathon-327a7",
storageBucket: "webathon-327a7.appspot.com",
messagingSenderId: "148161110223",
appId: "1:148161110223:web:a03a0ab58fa4fe28ded7ba",
measurementId: "G-BW307DF8JR"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
import { getAuth, createUserWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/10.4.0/firebase-auth.js";
document.getElementById("Sub").addEventListener("click", myauth);
function myauth(event){
event.preventDefault();
console.log('asff')
const auth = getAuth();
email = document.getElementById('email');
pass = document.getElementById('pass');
createUserWithEmailAndPassword(auth, email, password)
.then((userCredential) => {
// Signed up
const user = userCredential.user;
window.location.href = 'home.html';
// ...
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
console.log(errorCode);
console.log(errorMessage);
// ..
});
}
console.log('bye')
</script>
-->
<script type="module" src="index.js"></script>
</html>