I followed an online video tutorial on how to make a login system with fire base and Java script. I have copied it work for word but it does not work. I should be able to hit sign up and an alert should appear but non of the onclick functions seem to work. Help would be appreciated. I have looked in the console on inspect element as well but I cant seem to rectify the errors they are putting forward
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name=" viewport" content="width=device-width, initial-scale=1.0">
<script src="https://www.gstatic.com/firebasejs/9.0.1/firebase-app.js";></script>
<script src="https://www.gstatic.com/firebasejs/9.0.1/firebase-app.js";></script>
<script src="form.js"></script>
<title>Login System</title>
</head>
<body>
<div class="formContainer">
<h1>Enter Credentials Here:</h1>
<input type="email" placeholder="email here" id="email"></input>
<input type="password" placeholder="password here" id="password"></input>
<button onclick="signUp()" id="signUp">SignUp</button>
<button onclick="signIn()" id="signIp">SignIn</button>
<button onclick="signOut()" id="signOut">SignOut</button>
</div>
</body>
</html>
var firebaseConfig = {
apiKey: "AIzaSyAlbLt0YTa41lbutVo1-ic5nPV9Yri9-vE",
authDomain: "loginv2-b2f0e.firebaseapp.com",
projectId: "loginv2-b2f0e",
storageBucket: "loginv2-b2f0e.appspot.com",
messagingSenderId: "144798003676",
appId: "1:144798003676:web:257d3f649f532bb6d51f19",
measurementId: "G-X6QG246ZF6"
};
const app = initializeApp(firebaseConfig);;
const auth = firebase.auth();
//signup function
function signUp(){
var email = document.getElementById("email");
var password = document.getElementById("password");
const promise = auth.createUserWithEmailAndPassword(email.value,password.value);
//
promise.catch(e=>alert(e.message));
alert("SignUp Successfully");
}
//signIN function
function signIn(){
var email = document.getElementById("email");
var password = document.getElementById("password");
const promise = auth.signInWithEmailAndPassword(email.value,password.value);
promise.catch(e=>alert(e.message));
}
//signOut
function signOut(){
auth.signOut();
alert("SignOut Successfully from System");
}
//active user to homepage
firebase.auth().onAuthStateChanged((user)=>{
if(user){
var email = user.email;
alert("Active user "+email);
}else{
alert("No Active user Found")
}
})