Start a new topic

Custom URL for password reset through node.js code

Hi I am using single code with multiple website links for multiple branding....Is it possible to give a resetUrl for reset password from my node.js code?

Hi Revathi,

You can initiate the password reset procedure by making a request and passing the respective appkey (kid_...) and username or email - https://devcenter.kinvey.com/rest/guides/users#passwordreset


POST /rpc/:appKey/:username/user-password-reset-initiate
POST /rpc/:appKey/:email/user-password-reset-initiate


Let me know if this has helped or if I have misunderstood your question.


Regards,

Martin Apostolov

No...This is not a solution to my question....Once we hit the user-password-reset-initiate API user will receive the mail with resetUrl with a message. I want the ability to pass the resetUrl as a parameter from my code...Is it possible?

Hi Revathi,


Allow me to add some additional information on the possible cases for user's password change:


1) The user is logged-in in your application and just wants to change his password. In that case, you can simply call the user update endpoint (https://devcenter.kinvey.com/rest/guides/users#update) where you would pass the new user password and change the logged-in user password without the need to provide a reset password URL.


2) The user is not logged-in and has probably forgotten his password and that is why he needs a password reset. In that case the person asking for password reset can be anyone, not just the user himself. Sending the password reset URL to the user's email is a security measure to ensure that only the correct user (who presumably only has access to his email) would be able to access this password reset page. Therefore providing the reset password URL is only sent to the user's email as a security measure. Providing the reset password URL directly as a parameter from your code is not supported.


Let me know if this has answered your question.


Regards

Martin Apostolov

I can make the repo public and share it as well if that would be helpful, or I can share the dependencies of the project.


Login or Signup to post a comment