javascript - Firebase function is letting Invalid emails to be allowed -
i new firebase, sorry if seems basic
i wrote segment of code should register user. , that, but, can fill in email not exist.
this not full code, function responsible this
window.createuser = function (email, password) { firebase.auth().createuserwithemailandpassword(email, password).then(function () { location.reload(); }).catch(function (error) { if (document.getelementbyid("lemail").value == "" && document.getelementbyid("lpassword").value == "") { $("#lalert").html("<strong>oh no! </strong> looks email or password inputs not filled out!"); $("#lalert").show(); } else { $("#lalert").html("<strong>oh no! </strong>" + atranslate(error.code)); $("#lalert").show(); } }); }
atranslate()
function gets error code , changes customized message
if email doesn't exist email not real , made up, firebase authentication not check see whether or not email legit or made one. have test whether valid email or not yourself.
Comments
Post a Comment