Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 500 calling /api/vendure/resetPassword #205

Closed
OlegKunitsyn opened this issue Feb 22, 2022 · 1 comment
Closed

HTTP 500 calling /api/vendure/resetPassword #205

OlegKunitsyn opened this issue Feb 22, 2022 · 1 comment

Comments

@OlegKunitsyn
Copy link

Reproduction
Create a password-reset token, then try

const {setNew} = useForgotPassword();
await setNew({
  tokenValue: 'mytoken',
  newPassword: 'mypassword,
});

HTTP request
[{"tokenValue":"mytoken","newPassword":"mypassword"},null]

HTTP response
{"graphQLErrors":[],"networkError":{"name":"ServerError","response":{"size":0,"timeout":0},"statusCode":400,"result":{"errors":[{"message":"Variable \"$token\" of required type \"String!\" was not provided.","locations":[{"line":1,"column":32}]},{"message":"Variable \"$password\" of required type \"String!\" was not provided.","locations":[{"line":1,"column":49}]}]}},"message":"Network error: Response not successful: Received status code 400"}

See https://github.com/vuestorefront/template-magento/blob/main/pages/ResetPassword.vue

@bloodf bloodf transferred this issue from vuestorefront-community/template-vendure May 3, 2022
@Baroshem
Copy link
Contributor

Baroshem commented May 4, 2022

@OlegKunitsyn

Thanks for reporting that.

There seems to be an issue with parameter names. Mutation expects the variable with the name token, while it receives a variable with name tokenValue. Would you like to create a pull request with a fix? It should be rather a single line change :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants