I'm having a problem where every time I enter the right credentials, it brings me to one view controller then opens up the same view controller again even though I only have the login viewer controller linked to one view controller. If I don't enter the right credentials it still brings me into the linked view controller. Here is the code.
EDIT: Using a push segue(show)
@IBAction func loginTapped(_ sender: Any) { if let Email = userEmail.text, let Pass = userPassword.text{ Auth.auth().signIn(withEmail: Email, password: Pass, completion: { (user, error) in if error != nil{ print("incorrect") } else{ if error == nil{ self.performSegue(withIdentifier: "loginPage", sender: self) print("correct") } } }) } }