useCaptchaConfig
useCaptchaConfig():
UseQueryResult<CaptchaConfig,Error>
Hook to get the CAPTCHA configuration from the server Use this to determine which CAPTCHA provider to load
Returns
Section titled “Returns”UseQueryResult<CaptchaConfig, Error>
Example
Section titled “Example”function AuthPage() { const { data: captchaConfig, isLoading } = useCaptchaConfig();
if (isLoading) return <Loading />;
return captchaConfig?.enabled ? ( <CaptchaWidget provider={captchaConfig.provider} siteKey={captchaConfig.site_key} /> ) : null;}