解决方法
在更改密码之前,您将能够使用
reauthenticate实现它.
let user = FIRAuth.auth()?.currentUser let credential = FIREmailPasswordAuthProvider.credentialWithEmail(email,password: currentPassword) user?.reauthenticateWithCredential(credential,completion: { (error) in if error != nil{ self.displayAlertMessage("Error reauthenticating user") }else{ //change to new password } })