Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Password Reset Form Fails

jetate
Level 4
Level 4

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?

1 Accepted Solution
jetate
Correct answer by
Level 4
Level 4

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.

View solution in original post

1 Reply
jetate
Correct answer by
Level 4
Level 4

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.

View solution in original post