title: How to update Email Address in Firebase Authentication in Swift 4
body: <p>i just want to update authenticate email address of current user. i have tried lot's of solution like updateEmail method of firebase but it not work !! if any one know then please tell me how can i achieved this Thanks in advance !!</p>
  
  <p><a href="https://i.stack.imgur.com/W8lTd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W8lTd.png" alt="enter image description here"></a></p>
  
  <pre><code>@IBAction func btnResetEmailClick(_ sender: UIButton) {
          let auth = Auth.auth()
          guard let email = self.txtEmailAddress.text ?? auth.currentUser?.email else { return }
          // email that i have to update with current user email
          auth.currentUser?.updateEmail(to: (auth.currentUser?.email)!, completion: { (error) in
              if error == nil{
  
              }else{
              }
          })
      }
  </code></pre>