shahradelahi/react-geetest

Reset the captcha validation or clear captcha when some API Server if its error

Closed this issue · 4 comments

basically i have logic for signin in here

signInWithOTP(
        {...jsonPayload, ...geetestData},
        {onError: () => {/*do in here*/}}
)

how to reseting the captcha from start if some error happen?

  const captchaRef = React.useRef<GeeTestRef | null>(null)
  const handleLogin = () => {
    try {
      // do login
    } catch (e) {
      // handle error
    } finally {
      // reset captcha
      captchaRef.current?.reset()
    }
  }

Thanks @shahradelahi !!! Awesome :) 👍🏿

Hello @shahradelahi did you know how to change captcha challenge from slide into another? Thanks

Hello @rahXephonz,
To change the Geetest security strategy, refer to their console/dashboard and apply the changes on the Customization > Security strategy page.
If you want more product support, you can contact the Geetest support team.