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
- Update Type `AstroTurnstileOptions` to reflect the correct default values by switching from `z.infer` to a `typeof Schema._input` which properly shows the type as it would be used by the enduser
8
+
9
+
```ts
10
+
// Previously
11
+
typeAstroTurnstileOptions= {
12
+
endpointPath:string;
13
+
disableClientScript:boolean;
14
+
disableDevToolbar:boolean;
15
+
verbose:boolean;
16
+
}
17
+
18
+
// Now
19
+
typeAstroTurnstileOptions= {
20
+
endpointPath?:string|undefined;
21
+
disableClientScript?:boolean|undefined;
22
+
disableDevToolbar?:boolean|undefined;
23
+
verbose?:boolean|undefined;
24
+
} |undefined
25
+
```
26
+
27
+
- Update readme to include instructions and more information about what is available to users from the integration
Copy file name to clipboardexpand all lines: package/README.md
+72-2
Original file line number
Diff line number
Diff line change
@@ -68,10 +68,80 @@ export default defineConfig({
68
68
69
69
### Configuration
70
70
71
+
#### `.env` File
72
+
71
73
You will need to add these 2 values to your `.env` file:
72
74
73
-
-`siteKey` (required): Your Turnstile site key
74
-
-`secretKey` (required): Your Turnstile secret key - this should be kept secret
75
+
-`TURNSTILE_SITE_KEY` (required): Your Turnstile site key
76
+
-`TURNSTILE_SECRET_KEY` (required): Your Turnstile secret key - this should be kept secret
77
+
78
+
#### Astro Config Options
79
+
80
+
**`verbose`**
81
+
- Type: `boolean`
82
+
- Default: `false`
83
+
84
+
Enable verbose logging.
85
+
86
+
**`disableClientScript`**
87
+
- Type: `boolean`
88
+
- Default: `false`
89
+
90
+
Disable the client-side script injection.
91
+
92
+
By default, the client-side script is injected into the Astro project on every page. In some cases, you may want to disable this behavior, and manually inject the script where needed. This option allows you to disable the client-side script injection.
93
+
94
+
Note: If you disable the client-side script injection, you will need to manually inject the Turnstile client-side script into your Astro project.
95
+
96
+
**`disableDevToolbar`**
97
+
- Type: `boolean`
98
+
- Default: `false`
99
+
100
+
Disable the Astro Turnstile Dev Toolbar App.
101
+
102
+
**`endpointPath`**
103
+
- Type: `string`
104
+
- Default: `/verify`
105
+
106
+
The path to the injected Turnstile API endpoint.
107
+
108
+
### Usage
109
+
110
+
The following components are made available to the end user:
111
+
112
+
-**`TurnstileWidget`** - The main widget component for displaying the Turnstile captcha field in forms
0 commit comments