changePassword
Overview
This mutation takes the required inputs of an old and new password, and changes the password of the current account from the old password to the new one.
Special Considerations
- Takes two required inputs.
Inputs
MutationChangePasswordArgs
Required Data
oldPassword: string newPassword: string
Returns
Promise<SuccessResult>
A promise containing the success message.
Example
Running this mutation:
mutation {
changePassword(oldPassword: "OldPW", newPassword: "NewPW") {
message
}
}
Gives us:
{
"data": {
"changePassword": {
"message": "Updated password successfully!"
}
}
}
Common Errors
When running this mutation some of the common errors encountered include:
Incorrect credentials. (E-7001) or Invalid email or password. Please try again. (E-7006)
- Old password provided is not the current password of the account.
Failed to update password through Auth0: ... (E-7002)
- Third party service error.