I am working with java-script
fire-base
in my app.
I am able to createUserWithEmailAndPassword
successfully in app. Also it is showing that data inside Fire-base Console
.
Here is snippet.
firebase.auth().createUserWithEmailAndPassword("abc@gmail.com", "*******").catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
console.log("Eroor Msg" + errorMessage);
// ...
});
Then I have gone through firebase.auth().signInWithEmailAndPassword
.
With above method I am not be able to get any success event or message to log
. Even it is not throwing any error
.
Here is snippet.
firebase.auth().signInWithEmailAndPassword("abc@gmail.com", "*****")
.catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
if (errorCode === 'auth/wrong-password') {
alert('Wrong password.');
} else {
alert(errorMessage);
}
console.log(error);
});
My question is how to get success event in this method signInWithEmailAndPassword
?
Any help will be greatly appreciated.