html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script src="https://www.gstatic.com/firebasejs/5.8.2/firebase.js"></script>
<script>
// Initialize Firebase
</script>
</head>
<body>
dont use real email, because i can see your email...<br>
<input type="email" id="em" placeholder="Email...">
<input type="password" id="pa" placeholder="Password..."><br>
<button id="logInButton">Create New Account</button>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
body {
}
.hide{
display:none;
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
window.onload = function(){
var config = {
apiKey: "AIzaSyBL20Kcopf8TJ81lQyF8i4-bj9qR0U9xpA",
authDomain: "mytestingproject-6b451.firebaseapp.com",
databaseURL: "https://mytestingproject-6b451.firebaseio.com",
projectId: "mytestingproject-6b451",
storageBucket: "",
messagingSenderId: "905333300914"
};
firebase.initializeApp(config);
var logInButton = document.getElementById("logInButton")
logInButton.addEventListener('click', e => {
var email = em.value
var pass = pa.value
var promise = firebase.auth().createUserWithEmailAndPassword(email,pass)
promise.catch(e.message)
})
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run