From 2fd8a277b2f9439949e11efb6414cbe01ff23637 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Wed, 18 Mar 2026 18:36:14 +0200 Subject: [PATCH] PD-5218 reset password on reopening form --- .../lib/components/auth-challenge/auth-challenge.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/orcid-registry-ui/src/lib/components/auth-challenge/auth-challenge.component.ts b/projects/orcid-registry-ui/src/lib/components/auth-challenge/auth-challenge.component.ts index e406df9968..c8b7216c57 100644 --- a/projects/orcid-registry-ui/src/lib/components/auth-challenge/auth-challenge.component.ts +++ b/projects/orcid-registry-ui/src/lib/components/auth-challenge/auth-challenge.component.ts @@ -89,6 +89,10 @@ export class AuthChallengeComponent implements OnInit, OnDestroy { ngOnInit() { this.parentForm = this.data.parentForm + if (this.data.showPasswordField) { + this.parentForm.get(this.data.passwordControlName)?.setValue(null) + this.parentForm.get(this.data.passwordControlName)?.markAsUntouched() + } this.parentForm?.get(this.data.codeControlName)?.markAsUntouched() this.parentForm?.get(this.data.recoveryControlName)?.markAsUntouched() this.updateTwoFactorValidators()