title: loginaction says "please re-type password
body: <p>This is my viecontroller -</p>
  <pre><code> import UIKit
   import FirebaseFirestore
   import FirebaseAuth
   import Stripe
   import FirebaseFunctions
  
  class SignUpViewController: UIViewController {
  var paymentContext = STPPaymentContext()
  
  @IBOutlet weak var email: UITextField!
  @IBOutlet weak var password: UITextField!
  @IBOutlet weak var passwordConfirm: UITextField!
  @IBOutlet weak var login: UITextField!
  
  @IBOutlet weak var loginpassword: UITextField!
  @IBAction func signUpAction(_ sender: Any) {
      if password.text != passwordConfirm.text {
          let alertController = UIAlertController(title: &quot;Password Incorrect&quot;, message: &quot;Please re-type password&quot;, preferredStyle: .alert)
          let defaultAction = UIAlertAction(title: &quot;OK&quot;, style: .cancel, handler: nil)
          alertController.addAction(defaultAction)
          self.present(alertController, animated: true, completion: nil)
      }
      else{
          Auth.auth().createUser(withEmail: email.text!, password: password.text!){ [self]
              (user, error) in if error == nil {
                  // 
                  Functions.functions().httpsCallable(&quot;createStripeUser&quot;).call([&quot;email&quot;: email.text ?? &quot;&quot;]) {
                      (result, error) in
                      if let error = error {
                          debugPrint(error.localizedDescription)
                          return
                      }
                      self.dismiss(animated: true)
                  }
              }
              else{
                  let alertController = UIAlertController(title: &quot;Error&quot;, message: error?.localizedDescription, preferredStyle: .alert)
                  let defaultAction = UIAlertAction(title: &quot;OK&quot;, style: .cancel, handler: nil)
                  alertController.addAction(defaultAction)
                  self.present(alertController, animated: true, completion: nil)
              }
          }
      }
  }
  @IBAction func loginAction(_ sender: Any) {
        
  Auth.auth().signIn(withEmail: email.text!, password: password.text!) { (user, error) in
     if error == nil{
       self.performSegue(withIdentifier: &quot;loginToHome&quot;, sender: self)
                    }
      else{
       let alertController = UIAlertController(title: &quot;Error&quot;, message: error?.localizedDescription, preferredStyle: .alert)
       let defaultAction = UIAlertAction(title: &quot;OK&quot;, style: .cancel, handler: nil)
                      
        alertController.addAction(defaultAction)
        self.present(alertController, animated: true, completion: nil)
           }
       }
          
      }
    }
  </code></pre>
  <p>The &quot;signUpAction&quot; action works fine but the &quot;loginAction&quot; does not. It says &quot;re-type password whether the user is registered or not as shown below:-
  <a href="https://i.stack.imgur.com/VsJUg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VsJUg.png" alt="enter image description here" /></a></p>
  <p>The firebase and stripe customer is authenticated as shown in the figures below:-</p>
  <p><a href="https://i.stack.imgur.com/s1ve3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s1ve3.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/bW45b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bW45b.png" alt="enter image description here" /></a></p>
  <p>What am a I doing wrong ?</p>