aboutsummaryrefslogtreecommitdiff
path: root/shared/Login.js
blob: 184fb64da7a7405567fa336b1d2917698827a0fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$(document).ready(function(){
    $('#login').click(function(){
        var email = $("#email").val()
        var password = $("#password").val()
        if(email === '' || password === '') {
            alert('Please fill in all the fields')
        } else {
            firebase.auth().signInWithEmailAndPassword(email, password).catch(function(error) {
                // Handle Errors here.
                var errorCode = error.code;
                var errorMessage = error.message;
                alert(errorMessage)
                // ...
            });
        }
    })
})