'Firebase Auth Password Reset getting undefined as response

Below is my method for implementing the passwordReset. I am using it as documented here and shown in an example here. I keep getting response error code 'undefined' from the server. Can't figure out what I am doing wrong.

 handleResetPassword() {
  console.log(this.oobCode)
  console.log(this.form.password)
  firebase
    .auth()
    .confirmPasswordReset(this.oobCode, this.form.password)
    .then(() => this.router.navigate(['login']))
    .catch((err) => {
      // Error occurred during confirmation. The code might have expired or the
      // password is too weak.
      const errorMessage = `${err.code}`
      console.log(errorMessage)
      this.$buefy.snackbar.open({
        message: errorMessage,
        type: 'is-danger',
        position: 'is-bottom-right',
        duration: 3000,
      })
    })
},


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source