Skip to content

GraphQL: Reset user password with emailed token #7033

Closed
@MichaelJCole

Description

@MichaelJCole

New Issue Checklist

Issue Description

Hi, please correct me if I'm misunderstanding, but it looks like the GraphQL API cannot complete a "lost/reset password" UX for the user.

GraphQL API has a resetPassword mutation which sends an email with a link. Implemented here.

That link uses "customPages" to 302 to a FE web app location. My FE is responsible for helping the user complete their request.

Three functions complete this user interaction:

  1. request the email
  2. requestResetPassword to verify the email link is valid and forward to front-end application
  3. resetPassword to change the password.

The issue is I don't see how to complete that password reset with the GraphQL API.

I see two changes:

  1. Rename GraphQL mutation 'resetPassword' to 'requestResetPassword' to match the PublicAPIRouter.
  2. Implement GraphQL a new 'resetPassword' mutation that calls the PublicAPIRouter.

The workaround seems to be to use the REST API to send the users new password and complete the request.

Steps to reproduce

Build a password reset feature using Parse GraphQL API

Actual Outcome

Have web FE use Parse REST API to complete forgotPassword. I think this makes the GraphQL API incomplete.

Expected Outcome

Awesome form!

Environment

Server

  • Parse Server version: 4.4
  • Operating system: Ubuntu 20.04
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): localhost

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: FILL_THIS_OUT
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Local

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): FILL_THIS_OUT
  • SDK version: FILL_THIS_OUT

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions