Skip to content

Improve reset password API #6817

Open
Open
@germanbisogno

Description

@germanbisogno

Is your feature request related to a problem? Please describe.
I'm fan of parse server and after playing around this great tool I found a posible case of improvement on resetting password functionality. The error messages are not localized and there aren't specific error codes when making calls to the endpoint /request_password_reset, error codes are always -1. For example:

{code: -1, error: "Failed to reset password: username / email / token is invalid"}
{"code":-1,"error":"Password does not meet the Password Policy requirements."}

So, no way for the developer to handle error codes for a custom implementation of resetting password.

Describe alternatives you've considered
This implementation will require adding new error codes to the DefinitelyTyped like:

ParseError.USERNAME_NOT_FOUND = 603;
ParseError.RESET_PASSWORD_ERROR = 604;
ParseError.RESET_LINK_EXPIRED = 605;
ParseError.PASSWORD_POLICY_USERNAME = 606;
ParseError.PASSWORD_POLICY_REPEAT = 607;
ParseError.PASSWORD_POLICY_NOT_MEET = 608;

Additional context
This is my first time contributing to this great project and I'll appreciate if this proposal can be considered for future releases of parse server.

Related features:

  • Another feature that I considered that could be implemented in a separated ticket can be supporting password less authentication, I think it has been discussed already here

Thanks so much!

Awesome project guys!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions