Skip to content

Documentation for password reset #3719

Closed

Description

@chadclark1

I've integrated Mailgun for password reset on my parse server. Password reset emails are being sent properly with the reset link. However, I cannot find documentation on how to handle the password reset after the user clicks on the reset link. Where is the documentation regarding how to handle the link back to my webapp and actually allowing the user to choose a new password?

Activity

  1. hatpick commented on Apr 13, 2017

    @hatpick

    You can either define customPages or use default parse page to prompt users for a new password.

    customPages: {
            invalidLink: link that has your custom page,
            verifyEmailSuccess: link that has your custom page,
            choosePassword: link that has your custom page,
            passwordResetSuccess: link that has your custom page
          }
    

    Follow up question for parse folks:
    Is there a way to do "something" after a password was changed for a user?
    Let's suppose user A goes and generates&send the reset password link to their email, and then clicks on it and change their password successfully, is there a way for our app (e.g. cloud code) to detect that and call a function to do some cleanup?

  2. chadclark1 commented on Apr 14, 2017

    @chadclark1
    Author

    @hatpick I have defined my customPages, but the user isn't getting directed to the custom page. Instead they are directed to https://url.com/parse/apps/my-parse-app-id/request_password_reset?token=WVu39ZyNsPWOA7dbF4h6386bE&username=emailaddress%40yahoo.com
    Is there something else I need to do besides define customPages?

      publicServerURL: 'https://url.com/parse',
    
      appName: 'My App',
    
      emailAdapter: {
    
    module: 'parse-server-simple-mailgun-adapter',
    
    options: {
    
      fromAddress: 'noreply@url.com',
    
      domain: 'mg.url.com',
    
      apiKey: 'key-mykey',
    
        }
    
      },
    
      customPages: {
    
    invalidLink: 'http://url.com/link_invalid',
    
    verifyEmailSuccess: 'http://url.com/verify_email_success',
    
    choosePassword: 'https://url.com/choose_password',
    
    passwordResetSuccess: 'http://url.com/sucess'
    
      }
    
  3. omairvaiyani commented on Jun 4, 2017

    @omairvaiyani
    Contributor

    It appears that the choosePassword key is not actually utilised by parse-server:
    https://github.com/parse-community/parse-server/search?utf8=%E2%9C%93&q=choosePassword&type=

    It is actually using the key requestResetPasswordURL which has not been implemented in the customPages hash. Relatively quick fix I assume?

    https://github.com/parse-community/parse-server/search?utf8=%E2%9C%93&q=requestResetPasswordURL&type=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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