google recaptcha

generateGoogleReCaptchaScriptSrc

Utility function for generating Google reCAPTCHA script source URL

const scriptSrc = generateGoogleReCaptchaScriptSrc({
  host,
  isEnterprise,
  render,
  hl,
  badge
});

Parameters

ParameterTypeRequiredDefaultDescription
hoststring-'google.com'The host for the script source URL
isEnterpriseboolean-falseWhether to use the enterprise version of reCAPTCHA
renderstringYes-The render parameter for the script source URL
hlstring--The language code for the reCAPTCHA widget
badge'bottomright' | 'bottomleft' | 'inline'--The position of the reCAPTCHA badge

Return

Returns a string containing the complete URL for the Google reCAPTCHA script.

On this page