Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Shekar Siri
41ec24fa31 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.
2025-03-21 10:54:07 +01:00
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 { submitWithCaptcha, isVerifyingCaptcha, resetCaptcha } = props;
const handleSubmit = (token?: string) => { const handleSubmit = (token?: string) => {
if (!validatePassword(password) || !token) { if (!validatePassword(password)) {
return; return;
} }

View file

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