1

I am using Node js as front end and drupal as backend, i am trying to develop a reset password api. As per my finding there are three steps for the same.

  1. Request a Password (Send an email with secure time-bound link using request_new_password services resources)

  2. Reset Password (Process one time login link and return pass_reset_token using user_pass_reset service resources)

  3. Update Password by using pass_reset_token

I can do first and second steps easily, but how to update password by using pass_reset_token.

I saw Using Services, request new password but not very useful for me at least. how to do this ?

3
  • 3
    Have you tried npm package drupal-client? The client is 7.x compatible and handles the auth overhead. It has a resetPassword method too.
    – Shawn Conn
    Jul 7, 2020 at 0:53
  • @ShawnConn thanks, but i just want to explore the process of resetPassword
    – helpdoc
    Jul 7, 2020 at 9:54
  • 1
    The pass_reset_token token is designed to be used in a redirect URL when a user initiates the password reset URL: /user/{uid}/edit?pass-reset-token={pass_reset_token} As your linked Q states, the update endpoint makes use the same form. Have you attempted a PUT on /user/{uid}?pass-reset-token={pass_reset_token}? What did you see? Are you sure your node client is passing the credentials needed for authentication?
    – Shawn Conn
    Jul 7, 2020 at 18:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.