Skip to content

GraphQL Forgot Password mutation is not working #9415

@kevinadhiguna

Description

@kevinadhiguna

Bug report

Describe the bug

GraphQL forgotPassword mutation does not work as it always responses Bad Request even though I already set allow to forgotpassword in Users-Permissions and followed forgotPassword mutation documentation provided by Strapi in GraphQL Playground.

Steps to reproduce the behavior

  1. Go to 'Settings' on the left menu
  2. Click on 'Users & Permissions plugin' then select 'Roles'
  3. Edit 'Authenticated' role
  4. Scroll down to 'USERS-PERMISSIONS' then give a mark to 'forgotpassword' to allow it. Click Save.
  5. Go to GraphQL Playground (http://localhost:1337/graphql) to test forgotPassword mutation and set email as a variable.
  6. Insert email address in variable.
  7. Run forgotPassword mutation.
  8. See error response Bad Request but Strapi log showing /POST graphql 200.

Expected behavior

Response : { ok : true }

Screenshots

I allowed Forgot Password for authenticated users in Roles and Permissions :

allowed forgot password

Then I tested Forgot Password mutation in GraphQL Playground. I already followed GraphQL docs for forgotPassword mutation but it always responded Bad Request :

forgot password - bad request

However, Strapi log shows HTTP response status 200 OK :

strapi log

System

  • Node.js version: v14.15.5
  • Yarn version: v1.22.5
  • Strapi version: v3.4.6
  • Database: MongoDB
  • Operating system: Ubuntu Focal 20.04 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundsource: plugin:graphqlSource is plugin/graphql packagestatus: pending reproductionWaiting for free time to reproduce the issue, or more information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions