File length: 31430 # References - Plugins - `@supertokens-plugins/captcha-react` Source: https://supertokens.com/docs/references/plugins/captcha-react ## Classes ### Captcha Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:32](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L32) #### Constructors ##### Constructor ```ts new Captcha(): Captcha; ``` ###### Returns [`Captcha`](#captcha) #### Properties | Property | Modifier | Type | Default value | Defined in | | ------ | ------ | ------ | ------ | ------ | | `state` | `public` | `"uninitialised"` \| `"initialised"` \| `"loaded"` \| `"rendered"` | `"uninitialised"` | [supertokens-plugins/packages/captcha-react/src/captcha.ts:34](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L34) | #### Methods ##### addEventListener() ```ts addEventListener(event: T, listener: CaptchaEventListener): void; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:188](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L188) ###### Type Parameters | Type Parameter | | ------ | | `T` *extends* `"token-submitted"` \| `"render-failed"` \| `"get-token-failed"` | ###### Parameters | Parameter | Type | | ------ | ------ | | `event` | `T` | | `listener` | `CaptchaEventListener`\<`T`\> | ###### Returns `void` ##### getInputContainer() ```ts getInputContainer(): Promise; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:66](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L66) ###### Returns [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)\> ##### getToken() ```ts getToken(): Promise; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:151](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L151) ###### Returns [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\> ##### init() ```ts init(config: SuperTokensPluginCaptchaConfig): void; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:44](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L44) ###### Parameters | Parameter | Type | | ------ | ------ | | `config` | [`SuperTokensPluginCaptchaConfig`](#supertokensplugincaptchaconfig) | ###### Returns `void` ##### load() ```ts load(): Promise; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:85](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L85) ###### Returns [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> ##### removeEventListener() ```ts removeEventListener(event: T, listener: CaptchaEventListener): void; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:192](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L192) ###### Type Parameters | Type Parameter | | ------ | | `T` *extends* `"token-submitted"` \| `"render-failed"` \| `"get-token-failed"` | ###### Parameters | Parameter | Type | | ------ | ------ | | `event` | `T` | | `listener` | `CaptchaEventListener`\<`T`\> | ###### Returns `void` ##### render() ```ts render(onSubmit?: (token: string) => void, onError?: (error: Error) => void): Promise; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:120](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L120) Renders the captcha provider. The function accepts two callbacks that enable the following behaviors: - Pass callbacks that update some UI state and move ahead with the rendering process. Used when you render the captcha from the start. - Wrap the call in a promise and pass resolve/reject as callbacks. This way you can block your function and wait for the token value. This is used when the captcha is rendered after the user has submitted the authentication form. ###### Parameters | Parameter | Type | Description | | ------ | ------ | ------ | | `onSubmit?` | (`token`: `string`) => `void` | Called when the captcha token has been generated by the provider. | | `onError?` | (`error`: [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)) => `void` | Called when an error occurs during the captcha rendering process. | ###### Returns [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> *** ### ReCAPTCHAv2Provider Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:213](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L213) #### Implements - [`CaptchaProvider`](#captchaprovider) #### Constructors ##### Constructor ```ts new ReCAPTCHAv2Provider(config: Parameters): ReCAPTCHAv2Provider; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:216](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L216) ###### Parameters | Parameter | Type | | ------ | ------ | | `config` | `Parameters` | ###### Returns [`ReCAPTCHAv2Provider`](#recaptchav2provider) #### Methods ##### getToken() ```ts getToken(): Promise; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:275](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L275) ###### Returns [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\> ###### Implementation of [`CaptchaProvider`](#captchaprovider).[`getToken`](#gettoken-8) ##### load() ```ts load(): Promise; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:222](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L222) ###### Returns [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> ###### Implementation of [`CaptchaProvider`](#captchaprovider).[`load`](#load-8) ##### render() ```ts render( containerElement: HTMLDivElement, onSubmit: (token: string) => void, onError: (error: Error) => void): void; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:239](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L239) ###### Parameters | Parameter | Type | | ------ | ------ | | `containerElement` | [`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement) | | `onSubmit` | (`token`: `string`) => `void` | | `onError` | (`error`: [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)) => `void` | ###### Returns `void` ###### Implementation of [`CaptchaProvider`](#captchaprovider).[`render`](#render-6) ##### setToken() ```ts setToken(token: string): void; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:218](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L218) ###### Parameters | Parameter | Type | | ------ | ------ | | `token` | `string` | ###### Returns `void` *** ### ReCAPTCHAv3Provider Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:283](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L283) #### Implements - [`CaptchaProvider`](#captchaprovider) #### Constructors ##### Constructor ```ts new ReCAPTCHAv3Provider(config: ReCAPTCHAv3Config): ReCAPTCHAv3Provider; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:284](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L284) ###### Parameters | Parameter | Type | | ------ | ------ | | `config` | [`ReCAPTCHAv3Config`](#recaptchav3config) | ###### Returns [`ReCAPTCHAv3Provider`](#recaptchav3provider) #### Methods ##### getToken() ```ts getToken(): Promise; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:294](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L294) ###### Returns [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\> ###### Implementation of [`CaptchaProvider`](#captchaprovider).[`getToken`](#gettoken-8) ##### load() ```ts load(): Promise; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:286](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L286) ###### Returns [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> ###### Implementation of [`CaptchaProvider`](#captchaprovider).[`load`](#load-8) *** ### TurnstileProvider Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:312](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L312) #### Implements - [`CaptchaProvider`](#captchaprovider) #### Constructors ##### Constructor ```ts new TurnstileProvider(config: RenderParameters): TurnstileProvider; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:315](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L315) ###### Parameters | Parameter | Type | | ------ | ------ | | `config` | `RenderParameters` | ###### Returns [`TurnstileProvider`](#turnstileprovider) #### Methods ##### getToken() ```ts getToken(): Promise; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:395](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L395) ###### Returns [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\> ###### Implementation of [`CaptchaProvider`](#captchaprovider).[`getToken`](#gettoken-8) ##### load() ```ts load(): Promise; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:321](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L321) ###### Returns [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> ###### Implementation of [`CaptchaProvider`](#captchaprovider).[`load`](#load-8) ##### render() ```ts render( container: HTMLDivElement, onSubmit: (token: string) => void, onError: (error: Error) => void): void; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:338](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L338) ###### Parameters | Parameter | Type | | ------ | ------ | | `container` | [`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement) | | `onSubmit` | (`token`: `string`) => `void` | | `onError` | (`error`: [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)) => `void` | ###### Returns `void` ###### Implementation of [`CaptchaProvider`](#captchaprovider).[`render`](#render-6) ##### setToken() ```ts setToken(token: string): void; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:317](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L317) ###### Parameters | Parameter | Type | | ------ | ------ | | `token` | `string` | ###### Returns `void` ## Interfaces ### CaptchaProvider Defined in: [supertokens-plugins/packages/captcha-react/src/types.ts:17](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L17) #### Properties | Property | Type | Defined in | | ------ | ------ | ------ | | `getToken` | () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\> | [supertokens-plugins/packages/captcha-react/src/types.ts:20](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L20) | | `load` | (`onLoad?`: () => `void`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> | [supertokens-plugins/packages/captcha-react/src/types.ts:18](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L18) | | `render?` | (`container`: [`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement), `onSubmit`: (`token`: `string`) => `void`, `onError`: (`error`: [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)) => `void`) => `void` | [supertokens-plugins/packages/captcha-react/src/types.ts:19](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L19) | ## Type Aliases ### CaptchInputContainerProps ```ts type CaptchInputContainerProps = { form: | "EmailPasswordSignInForm" | "EmailPasswordSignUpForm" | "EmailPasswordResetPasswordEmail" | "EmailPasswordSubmitNewPassword" | "PasswordlessEmailForm" | "PasswordlessPhoneForm" | "PasswordlessEmailOrPhoneForm" | "PasswordlessEPComboEmailForm" | "PasswordlessEPComboEmailOrPhoneForm" | "PasswordlessUserInputForm"; } & React.HTMLAttributes; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/types.ts:82](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L82) #### Type Declaration | Name | Type | Defined in | | ------ | ------ | ------ | | `form` | \| `"EmailPasswordSignInForm"` \| `"EmailPasswordSignUpForm"` \| `"EmailPasswordResetPasswordEmail"` \| `"EmailPasswordSubmitNewPassword"` \| `"PasswordlessEmailForm"` \| `"PasswordlessPhoneForm"` \| `"PasswordlessEmailOrPhoneForm"` \| `"PasswordlessEPComboEmailForm"` \| `"PasswordlessEPComboEmailOrPhoneForm"` \| `"PasswordlessUserInputForm"` | [supertokens-plugins/packages/captcha-react/src/types.ts:83](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L83) | *** ### EmailPasswordCaptchaPreAndPostAPIHookActions ```ts type EmailPasswordCaptchaPreAndPostAPIHookActions = Extract; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/types.ts:50](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L50) *** ### PasswordlessCaptchaPreAndPostAPIHookActions ```ts type PasswordlessCaptchaPreAndPostAPIHookActions = Extract; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/types.ts:66](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L66) *** ### ReCAPTCHAv2Config ```ts type ReCAPTCHAv2Config = ReCaptchaV2.Parameters; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/types.ts:23](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L23) *** ### ReCAPTCHAv3Config ```ts type ReCAPTCHAv3Config = { action?: string; sitekey: string; }; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/types.ts:24](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L24) #### Properties | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | | `action?` | `string` | The name of the action. Actions may only contain alphanumeric characters and slashes, and must not be user-specific. | [supertokens-plugins/packages/captcha-react/src/types.ts:32](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L32) | | `sitekey` | `string` | Your sitekey. | [supertokens-plugins/packages/captcha-react/src/types.ts:28](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L28) | *** ### SuperTokensPluginCaptchaConfig ```ts type SuperTokensPluginCaptchaConfig = CaptchaConfig & { InputContainer?: React.ForwardRefExoticComponent>; inputContainerId?: | string | () => Promise; }; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/types.ts:77](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L77) #### Type Declaration | Name | Type | Defined in | | ------ | ------ | ------ | | `InputContainer?` | `React.ForwardRefExoticComponent`\<[`CaptchInputContainerProps`](#captchinputcontainerprops) & `React.RefAttributes`\<[`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)\>\> | [supertokens-plugins/packages/captcha-react/src/types.ts:78](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L78) | | `inputContainerId?` | \| `string` \| () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\> | [supertokens-plugins/packages/captcha-react/src/types.ts:79](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L79) | *** ### TurnstileConfig ```ts type TurnstileConfig = Turnstile.RenderParameters; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/types.ts:34](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L34) ## Variables ### captcha ```ts const captcha: Captcha; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/captcha.ts:440](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/captcha.ts#L440) *** ### CAPTCHA\_INPUT\_CONTAINER\_ID ```ts const CAPTCHA_INPUT_CONTAINER_ID: "supertokens-captcha-container" = "supertokens-captcha-container"; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/constants.ts:2](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/constants.ts#L2) *** ### CAPTCHA\_MODAL\_INPUT\_CONTAINER\_ID ```ts const CAPTCHA_MODAL_INPUT_CONTAINER_ID: "supertokens-captcha-modal-container" = "supertokens-captcha-modal-container"; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/constants.ts:3](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/constants.ts#L3) *** ### CaptchaInputContainer ```ts const CaptchaInputContainer: ForwardRefExoticComponent<{ form: | "EmailPasswordSignInForm" | "EmailPasswordSignUpForm" | "EmailPasswordResetPasswordEmail" | "EmailPasswordSubmitNewPassword" | "PasswordlessEmailForm" | "PasswordlessPhoneForm" | "PasswordlessEmailOrPhoneForm" | "PasswordlessEPComboEmailForm" | "PasswordlessEPComboEmailOrPhoneForm" | "PasswordlessUserInputForm"; } & HTMLAttributes & RefAttributes>; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/CaptchaInputContainer.tsx:10](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/CaptchaInputContainer.tsx#L10) *** ### default ```ts default: { init: (config: SuperTokensPluginCaptchaConfig) => SuperTokensPlugin; }; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/index.ts:6](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/index.ts#L6) #### Type Declaration | Name | Type | Defined in | | ------ | ------ | ------ | | `init()` | (`config`: [`SuperTokensPluginCaptchaConfig`](#supertokensplugincaptchaconfig)) => `SuperTokensPlugin` | [supertokens-plugins/packages/captcha-react/src/index.ts:6](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/index.ts#L6) | *** ### PLUGIN\_ID ```ts const PLUGIN_ID: "supertokens-plugin-captcha" = "supertokens-plugin-captcha"; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/constants.ts:1](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/constants.ts#L1) ## Functions ### EmailPasswordResetPasswordEmail() ```ts function EmailPasswordResetPasswordEmail(): EmailPasswordComponentOverrideMap; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/ComponentOverrides.tsx:31](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/ComponentOverrides.tsx#L31) #### Returns `EmailPasswordComponentOverrideMap` *** ### EmailPasswordSignInForm() ```ts function EmailPasswordSignInForm(): EmailPasswordComponentOverrideMap; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/ComponentOverrides.tsx:6](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/ComponentOverrides.tsx#L6) #### Returns `EmailPasswordComponentOverrideMap` *** ### EmailPasswordSignUpForm() ```ts function EmailPasswordSignUpForm(): EmailPasswordComponentOverrideMap; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/ComponentOverrides.tsx:18](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/ComponentOverrides.tsx#L18) #### Returns `EmailPasswordComponentOverrideMap` *** ### EmailPasswordSubmitNewPassword() ```ts function EmailPasswordSubmitNewPassword(): EmailPasswordComponentOverrideMap; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/ComponentOverrides.tsx:48](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/ComponentOverrides.tsx#L48) #### Returns `EmailPasswordComponentOverrideMap` *** ### getPluginConfig() ```ts function getPluginConfig(): SuperTokensPluginCaptchaConfig; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/config.ts:34](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/config.ts#L34) #### Returns [`SuperTokensPluginCaptchaConfig`](#supertokensplugincaptchaconfig) *** ### init() ```ts function init(config: SuperTokensPluginCaptchaConfig): SuperTokensPlugin; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/plugin.ts:16](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/plugin.ts#L16) #### Parameters | Parameter | Type | | ------ | ------ | | `config` | [`SuperTokensPluginCaptchaConfig`](#supertokensplugincaptchaconfig) | #### Returns `SuperTokensPlugin` *** ### isEmailPasswordCaptchaPreAndPostAPIHookAction() ```ts function isEmailPasswordCaptchaPreAndPostAPIHookAction(action: string): action is any; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/types.ts:55](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L55) #### Parameters | Parameter | Type | | ------ | ------ | | `action` | `string` | #### Returns `action is any` *** ### isPasswordlessCaptchaPreAndPostAPIHookAction() ```ts function isPasswordlessCaptchaPreAndPostAPIHookAction(action: string): action is any; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/types.ts:71](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/types.ts#L71) #### Parameters | Parameter | Type | | ------ | ------ | | `action` | `string` | #### Returns `action is any` *** ### PasswordlessEmailForm() ```ts function PasswordlessEmailForm(): PasswordlessComponentOverrideMap; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/ComponentOverrides.tsx:64](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/ComponentOverrides.tsx#L64) #### Returns `PasswordlessComponentOverrideMap` *** ### PasswordlessEmailOrPhoneForm() ```ts function PasswordlessEmailOrPhoneForm(): PasswordlessComponentOverrideMap; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/ComponentOverrides.tsx:89](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/ComponentOverrides.tsx#L89) #### Returns `PasswordlessComponentOverrideMap` *** ### PasswordlessEPComboEmailForm() ```ts function PasswordlessEPComboEmailForm(): PasswordlessComponentOverrideMap; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/ComponentOverrides.tsx:106](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/ComponentOverrides.tsx#L106) #### Returns `PasswordlessComponentOverrideMap` *** ### PasswordlessEPComboEmailOrPhoneForm() ```ts function PasswordlessEPComboEmailOrPhoneForm(): PasswordlessComponentOverrideMap; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/ComponentOverrides.tsx:123](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/ComponentOverrides.tsx#L123) #### Returns `PasswordlessComponentOverrideMap` *** ### PasswordlessPhoneForm() ```ts function PasswordlessPhoneForm(): PasswordlessComponentOverrideMap; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/ComponentOverrides.tsx:76](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/ComponentOverrides.tsx#L76) #### Returns `PasswordlessComponentOverrideMap` *** ### PasswordlessUserInputCodeForm() ```ts function PasswordlessUserInputCodeForm(): PasswordlessComponentOverrideMap; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/components/ComponentOverrides.tsx:140](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/components/ComponentOverrides.tsx#L140) #### Returns `PasswordlessComponentOverrideMap` *** ### setPluginConfig() ```ts function setPluginConfig(config: SuperTokensPluginCaptchaConfig): void; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/config.ts:8](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/config.ts#L8) #### Parameters | Parameter | Type | | ------ | ------ | | `config` | [`SuperTokensPluginCaptchaConfig`](#supertokensplugincaptchaconfig) | #### Returns `void` *** ### useCaptcha() ```ts function useCaptcha(onError?: (error: string) => void): { containerId: | string | () => Promise; load: (configOverride: Partial) => Promise; render: () => Promise; state: CaptchaState; }; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/hooks/useCaptcha.ts:8](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/hooks/useCaptcha.ts#L8) #### Parameters | Parameter | Type | | ------ | ------ | | `onError?` | (`error`: `string`) => `void` | #### Returns ```ts { containerId: | string | () => Promise; load: (configOverride: Partial) => Promise; render: () => Promise; state: CaptchaState; } ``` | Name | Type | Default value | Defined in | | ------ | ------ | ------ | ------ | | `containerId` | \| `string` \| () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\> | `captchaInputContainerId` | [supertokens-plugins/packages/captcha-react/src/hooks/useCaptcha.ts:31](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/hooks/useCaptcha.ts#L31) | | `load()` | (`configOverride`: [`Partial`](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)\<[`SuperTokensPluginCaptchaConfig`](#supertokensplugincaptchaconfig)\>) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\> | `captchaStore.load` | [supertokens-plugins/packages/captcha-react/src/hooks/useCaptcha.ts:29](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/hooks/useCaptcha.ts#L29) | | `render()` | () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> | `captchaStore.render` | [supertokens-plugins/packages/captcha-react/src/hooks/useCaptcha.ts:30](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/hooks/useCaptcha.ts#L30) | | `state` | `CaptchaState` | `captchaState` | [supertokens-plugins/packages/captcha-react/src/hooks/useCaptcha.ts:28](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/hooks/useCaptcha.ts#L28) | *** ### useCaptchaInputContainer() ```ts function useCaptchaInputContainer(): ForwardRefExoticComponent<{ form: | "EmailPasswordSignInForm" | "EmailPasswordSignUpForm" | "EmailPasswordResetPasswordEmail" | "EmailPasswordSubmitNewPassword" | "PasswordlessEmailForm" | "PasswordlessPhoneForm" | "PasswordlessEmailOrPhoneForm" | "PasswordlessEPComboEmailForm" | "PasswordlessEPComboEmailOrPhoneForm" | "PasswordlessUserInputForm"; } & HTMLAttributes & RefAttributes>; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/hooks/useCaptchaInputContainer.ts:6](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/hooks/useCaptchaInputContainer.ts#L6) #### Returns `ForwardRefExoticComponent`\<\{ `form`: \| `"EmailPasswordSignInForm"` \| `"EmailPasswordSignUpForm"` \| `"EmailPasswordResetPasswordEmail"` \| `"EmailPasswordSubmitNewPassword"` \| `"PasswordlessEmailForm"` \| `"PasswordlessPhoneForm"` \| `"PasswordlessEmailOrPhoneForm"` \| `"PasswordlessEPComboEmailForm"` \| `"PasswordlessEPComboEmailOrPhoneForm"` \| `"PasswordlessUserInputForm"`; \} & `HTMLAttributes`\<[`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)\> & `RefAttributes`\<[`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)\>\> *** ### validatePublicConfig() ```ts function validatePublicConfig(config: SuperTokensPublicConfig): void; ``` Defined in: [supertokens-plugins/packages/captcha-react/src/config.ts:41](https://github.com/supertokens/supertokens-plugins/blob/main/packages/captcha-react/src/config.ts#L41) #### Parameters | Parameter | Type | | ------ | ------ | | `config` | `SuperTokensPublicConfig` | #### Returns `void`