Skip to content

Does Parse sdk support to do forgot password? #269

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

Closed
hautran90 opened this issue Sep 10, 2019 · 4 comments
Closed

Does Parse sdk support to do forgot password? #269

hautran90 opened this issue Sep 10, 2019 · 4 comments

Comments

@hautran90
Copy link

Hi @channel. Does Parse sdk support to do forgot password? I only find it supported requestPasswordRese. Thanks all!

@phillwiggins
Copy link
Member

phillwiggins commented Sep 10, 2019 via email

@Atteprojects
Copy link

I have this issue as well.
the requestPasswordRese sends a reset email instruction to a user that is already logged in and it does not take any arguments.
How do I let the user reset their forgotten password if they are not logged in?

@RodrigoSMarques
Copy link
Contributor

@Atteprojects
See my code sample.

  Future<ApiResponse> recoveryPassword(String email) async {
    final ParseUser user = ParseUser(email.toLowerCase(), '', email);
    final ParseResponse parseResponse = await user.requestPasswordReset();
    if (parseResponse.success) {
      return ApiResponse.success();
    } else {
      return ApiResponse.error(
          error: ApiError(
              code: parseResponse.error.code,
              message: ParseErrors.getDescription(parseResponse.error.code)));
    }
  }

@Atteprojects
Copy link

This is very helpful. Thank you very much!

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

4 participants