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 e406df996..c8b7216c5 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()