You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_react-native-google-recaptcha-provider_ is a library for integrating Google reCAPTCHA into React Native applications. It provides a convenient way to add and customize reCAPTCHA in your application to prevent spam and abuse.
15
14
16
-
// ...
15
+
## Example
17
16
18
-
constresult=awaitmultiply(3, 7);
19
-
```
17
+
[You can find a usage example here](./example)
18
+
19
+
## Customization
20
+
21
+
The library provides various customization options such as specifying the size, theme, language, and action associated with the reCAPTCHA widget.
20
22
21
-
## Contributing
23
+
## Method and Field Descriptions
22
24
23
-
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
| siteKey | string | Yes | The site key obtained from Google reCAPTCHA. |
29
+
| baseUrl | string | Yes | The base URL of the website where reCAPTCHA is being used. |
30
+
| onVerify | (token: string) => void | Yes | Callback function invoked when reCAPTCHA token is successfully verified. |
31
+
| onExpire | () => void | No | Callback function invoked when the reCAPTCHA token expires. |
32
+
| onError | (error: any) => void | No | Callback function invoked when an error occurs during reCAPTCHA verification. |
33
+
| onClose | () => void | No | Callback function invoked when the reCAPTCHA widget is closed without completing. |
34
+
| onLoad | () => void | No | Callback function invoked when the WebView finishes loading the HTML content. |
35
+
| loadingComponent | ReactNode | No | A custom loading component to display while reCAPTCHA is loading. |
36
+
| webViewProps | Omit<WebViewProps, 'source' \| 'style' \| 'onMessage'> | No | Additional props to be passed to the underlying WebView component. |
37
+
| lang | string | No | The language code to use for reCAPTCHA. |
38
+
| size | 'normal' \| 'compact' \| 'invisible' | No | The size of the reCAPTCHA widget. Possible values: 'normal', 'compact', 'invisible'. Default is 'normal'. |
39
+
| theme | 'light' \| 'dark' | No | The theme of the reCAPTCHA widget. Possible values: 'light', 'dark'. Default is 'light'. |
40
+
| enterprise | boolean | No | Specifies whether to use the new reCAPTCHA Enterprise API. Default is false. |
41
+
| action | string | No | An additional parameter for specifying the action name associated with the protected element. |
42
+
| recaptchaDomain | string | No | The domain of the reCAPTCHA service. Defaults to 'www.google.com'. |
43
+
| gstaticDomain | string | No | The domain of the Google static content. Defaults to 'www.gstatic.com'. |
44
+
| hideBadge | boolean | No | Specifies whether to hide the reCAPTCHA badge. Defaults to false. |
45
+
| style | StyleProp\<ViewStyle\>| No | The style object or stylesheet for the root container of the component. |
The reCAPTCHA component is implemented in such a way that it stretches to the full available width and height by default. Users are expected to implement their own modal window for displaying the reCAPTCHA challenge.
4
+
5
+
## Implementation
6
+
7
+
To see an example implementation of how to use `react-native-google-recaptcha-provider`, you can refer to the `ModalExample.tsx`. This file demonstrates how to integrate the reCAPTCHA component within a modal window.
0 commit comments