I am trying the JS SDK of Firebase, naturally, I picked up the provided example and started to dive in.
The example code is for e-mail sign in, hosting on Firebase.
What surprise me is that all password-compliance is made client-side:
...
function toggleSignIn() {
if (firebase.auth().currentUser) {
// [START signout]
firebase.auth().signOut();
// [END signout]
} else {
var email = document.getElementById('email').value;
var password = document.getElementById('password').value;
if (email.length < 4) {
alert('Please enter an email address.');
return;
}
if (password.length < 4) {
alert('Please enter a password.');
return;
}
...
What mecanism prevent someone from opening the code in the console, removing the check, and registering under a empty string as e-mail/password?
Searching for firebase security only tell me that everything is made in HTTPS, and that server-side rules are customizable to prevent anyone not signed in from editing the DB, but what about this?