Password Reset Form Fails | Community
Skip to main content
jetate
New Participant
May 16, 2018
Solved

Password Reset Form Fails

  • May 16, 2018
  • 1 reply
  • 940 views

I've built a password reset form for my users using an Adaptive Form. I have AJAX calling a Sling Servlet to update the password, and everything works correctly on my local AEM instance. I've built the servlet based on the OOTB password reset logic JSP from /libs/foundation/components/account/passwordreset.

On my local instance, the password is reset after meeting all of the requirements with a matching current password. On my dev AWS instance, which I know is set up differently and is managed by another department, the password reset fails every time with the message "Failed to change password: Old password does not match." returned from a try catch on the changePassword() call. This is happening regardless of the correctness of the current password.

I have a different form that I build using the OOTB password reset form from the old Forms component. This is using the JSP from /libs/foundation/components/account/passwordreset and successfully updates the password with the Adaptive Form version will not work. Once I've updated the password with the OOTB form, my Adaptive Form version will work correctly for a limited period of time.

What am I missing in my form? Some kind of token or authorization? Is this a hidden field I can create?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by jetate

On our dev instance, the processing script was always seeing the user as admin. Made some modifications to pass the username through in a hidden field, and everything is working.

1 reply

jetate
jetateAuthorAccepted solution
New Participant
May 18, 2018

On our dev instance, the processing script was always seeing the user as admin. Made some modifications to pass the username through in a hidden field, and everything is working.