fix(auth): remove unnecessary captcha token validation (#3188)

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:55:39 +01:00 committed by GitHub
parent cc704f1bc3
commit 0724cf05f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) => {