Implementing custom confirmPasswordReset error in authService

Hi all,

I bumped into an unexpected error message regarding the password reset methods of the API. I’m building on a PWA and therefore we use Ionic Auth as a login mechanism. I’m trying to implement the password reset method, which seems to work fine untill the moment I’m calling auth.confirmPasswordReset(code,newPassword), which is documented over here.

The docs tell me to pass two params to the confirmPasswordReset method, i.e. code and password. When I’m passing in the received code and a new password, I get the following error back in my console:

Error: Code, new password, and email are required.

So, it tells me to pass in the email as well. Anyone else encountered this issue or knows the answer on how to solve this?

Thanks in advance.

Okay, so this is probably due to some broken interface in the typescript. At first the interface shouldnt only accept code and new password, but new email as well (that was what’s causing the issue). Furthermore the code shouldn’t be a number but a string, otherwise the API won’t except it. So we circumvented this by just putting it directly into the API, but it’s definitely a bug.

Any update on this? It looks like it’s still an issue as I’m getting a Error: Unsuccessful HTTP response

message
"An error occurred while validating the request parameters."

Yes i find it out. The code must be string and not number

$ionicAuth.confirmPasswordReset(n.toString(), $scope.data.npassword)