Skip to content

Instantly share code, notes, and snippets.

@AsthaSharma1
Last active June 23, 2021 17:17
Show Gist options
  • Save AsthaSharma1/8e6115083cbe16504bc603e7f88196ce to your computer and use it in GitHub Desktop.
Save AsthaSharma1/8e6115083cbe16504bc603e7f88196ce to your computer and use it in GitHub Desktop.
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "AIzaSyBAGCR7VhRhpCTbln069BS4WTFf0UQcbyk",
authDomain: "loginpage-dc3a1.firebaseapp.com",
projectId: "loginpage-dc3a1",
storageBucket: "loginpage-dc3a1.appspot.com",
messagingSenderId: "368995587873",
appId: "1:368995587873:web:9997247edef5f1b74f9060"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
const auth = firebase.auth();
function signIn(){
var email = document.getElementById("email");
var password = document.getElementById("password");
const promise = auth.signInWithEmailAndPassword(email.value, password.value);
promise.then(() => location.replace("./djQueue.html")).catch(e => alert(e.message));
};
function signOut(){
auth.signOut();
location.replace("./login.html");
alert("Signed Out")
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment