Skip to content

@capgo/capacitor-recaptcha

Generate reCAPTCHA and reCAPTCHA Enterprise tokens on Web, Android, and iOS before sensitive backend requests.

@capgo/capacitor-recaptcha loads Google reCAPTCHA on each Capacitor platform and returns a token for a named action.

Use it before sensitive requests such as login, signup, checkout, password reset, or abuse-prone form submissions. Send the token to your backend and create a reCAPTCHA assessment there.

  • load - Loads and caches the platform reCAPTCHA client.
  • execute - Runs reCAPTCHA for an action and returns a token.
  • getPluginVersion - Returns the native implementation version marker.
PlatformSupport
WebreCAPTCHA v3 with api.js, or reCAPTCHA Enterprise with enterprise.js
AndroidGoogle mobile reCAPTCHA SDK. Native regular reCAPTCHA v3 is not a separate mode; enterprise: false is rejected.
iOSGoogle RecaptchaEnterprise SDK. Native regular reCAPTCHA v3 is not a separate mode; enterprise: false is rejected.
MethodDescription
loadLoads and caches the reCAPTCHA client for the current platform.
executeExecutes reCAPTCHA for an action and returns a token for backend assessment.
getPluginVersionReturns the platform implementation version marker.

This reference is synced from src/definitions.ts in capacitor-recaptcha.

Keep going from @capgo/capacitor-recaptcha

Section titled “Keep going from @capgo/capacitor-recaptcha”

If you are using @capgo/capacitor-recaptcha to plan authentication and account flows, connect it with Using @capgo/capacitor-recaptcha for the native capability in Using @capgo/capacitor-recaptcha, @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, and Two-factor authentication for the implementation detail in Two-factor authentication.