Turnstile docs: limit before asking Cloudflare; test and lint fixes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-26 20:22:21 +01:00
co-authored by Claude Opus 5.5
parent 6ca0730c08
commit b2fed3bf90
4 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -262,5 +262,5 @@ full control or have an unusual case. The provider is a convenience layer over i
- **Access to the keys:** Site integrations is admin-only (read and update); change it with
`iapl({ globalOverrides: { 'site-integrations': { access: … } } })` — keep `read` restricted, the secret lives there.
- **Look:** `theme` on `<Turnstile>` / `<TurnstileWidget theme>`, `turnstileTheme` in `RenderForm` / `BuilderForm`.
- **Your own integration:** `checkTurnstile` (full `pass` / `reject` / `degraded` classification),
- **Your own integration:** limit first, then ask Cloudflare — `consumeRateLimit({ key: clientIp(req), scope: 'signup' })` before `checkTurnstile`, so a flood of posts does not become a flood of requests to Cloudflare (the plugin's forms do it in this order: `passRateLimit`, then `passTurnstile`). `checkTurnstile` (full `pass` / `reject` / `degraded` classification),
`verifyTurnstile`, `getTurnstileConfig`, `<Turnstile>`, `useTurnstile` / `useOptionalTurnstile`.