When I use the function signInWithEmailAndPassword(email, password) , this works completely fine on Chrome. However, when I go to the same website and use the same credentials on iOS Safari I get this error:
code: "auth/network-request-failed", message: "A network error (such as timeout, interrupted connection or unreachable host) has occurred.
This is the function where the problem is. It is called from the onSubmit attribute of a html form.
function formSubmit() {
var config = {
// config here
};
var app = firebase.initializeApp(config);
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
console.log("firebase user is: " + firebase.auth().currentUser.uid);
return true;
} else {
console.log("No user")
}
});
var email = document.getElementById("emailInput").value;
var password = document.getElementById("passwordInput").value;
firebase.auth().signInWithEmailAndPassword(email, password)
.then(function(userReturn) {
console.log("userReturn is " + userReturn);
})
.catch(function(error) {
console.log(error);
})
}