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:
parent
a1337faeee
commit
6adb45e15f
2 changed files with 1 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue