DJForm Login Help!

Joined
Jun 14, 2018
Messages
105
Reaction score
1
i've created a loginform.html and loginform.js

i'm using firebase as the database so in short

firebase is setup!

html form is done

so is loginform.js

BUT when i go and test the login form nothing happens?

i'v inspected element got this error

Uncaught SyntaxError: Unexpected token '}' (at loginform.js:2:292)

content.js:1 Phisherman loaded... loginform.js:2

now the html i got is

HTML:
<html>
<head>
<title> Login Page </title>
<script src="https://www.gstatic.com/firebasejs/8.6.3/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.3/firebase-auth.js"></script>
<script src="https://coolvibes-reloaded.com/ReqForm/loginform.js"> </script>
    <link href="https://coolvibes-reloaded.com/ReqForm/style.css" rel="stylesheet" />


</head>
<body>
<div id="form">
<h1> DJ Portal </h1>
<div id="header"> </div>

<input type="email" placeholder="Enter Email" id="email"/>
    <input type="password" placeholder="Enter Password" id="password"/>


<button onclick="signIn()" id="signIn"> Sign In </button>

<a href="https://coolvibes-reloaded.com/ReqForm/ReqQue/display.html"> Check out the current queue </a> <br/><br/>
    <a href="https://coolvibes-reloaded.com/ReqForm/form.html"> Song Form  </a>

</div>

</body>

</html>
the JS script:

JavaScript:
// Your web app's Firebase configuration
  var firebaseConfig = {
    apiKey: "myapi",
  authDomain: "myauth",
  projectId: "myid",
  storageBucket: "my storage bucket",
  messagingSenderId: "senderid",
  appId: "appid",
  };
  // Initialize Firebase
  firebase.initializeApp(firebaseConfig);

const auth = firebase.auth();


function signIn() {
  var email = document.getElementById("email").value;
  var password = document.getElementById("password").value;

  firebase.auth().signInWithEmailAndPassword(email, password)
    .then((userCredential) => {
      // Signed in
      alert("Signed in successfully!");
    })
    .catch((error) => {
      alert("Error: " + error.message);
    });
}

  var email = document.getElementById("email");
  var password = document.getElementById("password");

  const promise = auth.signInWithEmailAndPassword(email.value, password.value);
  promise.then(() => location.replace(".https://coolvibes-reloaded.com/ReqForm/ReqQue/djqueue.html")).catch(e => alert(e.message));


};

function signOut(){
  auth.signOut();
  location.replace(".https://coolvibes-reloaded.com/ReqForm/loginform.html");
  alert("Signed Out")
}


});
now obviously i have all my creds in this script from firebase but didn't want to show them for privacy concern. i have debuged but still nothing..... button isn't even signing in
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,907
Messages
2,570,008
Members
46,366
Latest member
TJOChristi

Latest Threads

Top