My code doesn't work properly. I created google firebase Authentication. My code is down
@IBAction func loginClicked(_ sender: UlButton) {
if let email = usernameText.text, let password = passwordText.text {
Auth.auth().signIn(withEmail: email, password: password) {authResult, error in
self.makeAlert(titleInput: "Error", messagelnput:"Error")
}
self.performSegue(withldentifier: "goToViewController", sender: nil)
}
}
Then I wrote this code. Error message is displayed when you enter wrong email and wrong password on login page. But it also goes to the other page(Home Page, ldentifier: "goToViewController"). I dont want do this. When I enter the wrong email and wrong password, I want to show error message only.
How can I do that? Thank you for your help