I'm setting up the login page for a new web-app I'm developing. I'm using Framework 7 with Google Firebase. The problem is that when I click the "login" button, Firebase returns in nothing... it just reloads the page, even if the user and password are okay.
I've tried to take a look to the errors the function might throw (using the dev console) but it results in nothing (as I say, the page just reloads).
This is my javascript login function:
function login() {
var formData = app.form.convertToData('#login-form');
firebase.auth().signInWithEmailAndPassword(formData.username, formData.password).then(function () {
mainView.router.navigate({name: 'dashboard'});
}).catch(function (error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
console.log(`[${errorCode}] ${errorMessage}`);
$('#login-error').html(errorMessage);
});
}