diff options
| author | Kumar Priyansh <[email protected]> | 2019-05-31 17:04:59 +0700 |
|---|---|---|
| committer | Kumar Priyansh <[email protected]> | 2019-05-31 17:04:59 +0700 |
| commit | 04aed41edf9ae865c13fc011ea4dcd5618e39a67 (patch) | |
| tree | a85ea33b1ccad4c8de0791933e3c2a2647f5c5ee /shared/Login.js | |
| parent | 799952c5eb1ec605b42fc1e8951db156c7d77c85 (diff) | |
| download | firebase-ecommerce-04aed41edf9ae865c13fc011ea4dcd5618e39a67.tar.xz firebase-ecommerce-04aed41edf9ae865c13fc011ea4dcd5618e39a67.zip | |
Updated Login JS
Diffstat (limited to 'shared/Login.js')
| -rw-r--r-- | shared/Login.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/shared/Login.js b/shared/Login.js index e69de29..184fb64 100644 --- a/shared/Login.js +++ b/shared/Login.js @@ -0,0 +1,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) + // ... + }); + } + }) +})
\ No newline at end of file |
