Skip to content

Documentation for password reset #3719

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
chadclark1 opened this issue Apr 13, 2017 · 3 comments
Closed

Documentation for password reset #3719

chadclark1 opened this issue Apr 13, 2017 · 3 comments

Comments

@chadclark1
Copy link

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?

@hatpick
Copy link

hatpick commented Apr 13, 2017

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?

@chadclark1
Copy link
Author

chadclark1 commented Apr 14, 2017

@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: '[email protected]',

  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'

  }

@omairvaiyani
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants