fix(auth): remove unnecessary captcha token validation

The token validation checks were redundant as the validation is already
handled by the captcha wrapper component. This change simplifies the
password reset flow while maintaining security.
This commit is contained in:
Shekar Siri 2025-03-21 10:54:07 +01:00
parent cc704f1bc3
commit 41ec24fa31
2 changed files with 1 additions and 3 deletions

View file

@ -32,7 +32,7 @@ function CreatePassword(props: Props & WithCaptchaProps) {
const { submitWithCaptcha, isVerifyingCaptcha, resetCaptcha } = props;
const handleSubmit = (token?: string) => {
if (!validatePassword(password) || !token) {
if (!validatePassword(password)) {
return;
}

View file

@ -43,8 +43,6 @@ function ResetPasswordRequest(props: Props & WithCaptchaProps) {
};
const handleSubmit = (token?: string) => {
if (!token) return;
setError(null);
requestResetPassword({ email: email.trim(), 'g-recaptcha-response': token })
.catch((err: any) => {