recaptcha

master
alex 2024-02-10 08:39:29 +01:00
parent f8fc680f3d
commit e21745125d
1 changed files with 2 additions and 0 deletions

View File

@ -253,6 +253,7 @@ function Login({ notificationApi }) {
]} ]}
> >
<ReCAPTCHA <ReCAPTCHA
ref={recaptchaValueRef}
sitekey={process.env.REACT_APP_RECAPTCHA_SITE_KEY} sitekey={process.env.REACT_APP_RECAPTCHA_SITE_KEY}
onChange={(value) => (recaptchaValueRef.current = value)} onChange={(value) => (recaptchaValueRef.current = value)}
/> />
@ -345,6 +346,7 @@ function Login({ notificationApi }) {
.catch((errStatus) => { .catch((errStatus) => {
showErrorNotification(errStatus); showErrorNotification(errStatus);
setIsRequesting(false); setIsRequesting(false);
recaptchaValueRef.current.reset();
}); });
}) })
.catch(() => showInputsInvalidNotification(notificationApi, t)); .catch(() => showInputsInvalidNotification(notificationApi, t));