capacitor-plugin-recaptcha
Version:
Capacitor plugin for reCAPTCHA Enterprise
29 lines (28 loc) • 827 B
TypeScript
import { WebPlugin } from '@capacitor/core';
import type { RecaptchaEnterprisePlugin } from './definitions';
declare global {
interface Window {
Capacitor?: any;
}
}
export interface WebExecuteOptions {
action: string;
}
export declare class CapacitorPluginRecaptcha extends WebPlugin implements RecaptchaEnterprisePlugin {
/**
* Loads the reCAPTCHA SDK for the given siteKey. Should be called during app startup.
* @param siteKey The reCAPTCHA site key to use.
*/
load(options: {
siteKey: string;
}): Promise<void>;
/**
* Executes reCAPTCHA with the previously loaded siteKey. Throws if not loaded.
*/
execute(options: WebExecuteOptions): Promise<{
token: string;
siteKey: string;
}>;
private _recaptcha;
private _siteKey;
}