-
Notifications
You must be signed in to change notification settings - Fork 9.9k
[Turnstile] Documentation overhaul #24068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
patriciasantaana
merged 32 commits into
production
from
patricia/pcx18133-turnstile-docs-v2
Aug 13, 2025
Merged
Changes from 26 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
f99ec9b
new structure
patriciasantaana a81864d
Merge branch 'production' into patricia/pcx18133-turnstile-docs-v2
patriciasantaana 587a109
Merge branch 'production' into patricia/pcx18133-turnstile-docs-v2
patriciasantaana d3a2b9d
sidebar nav order
patriciasantaana 1e8fda7
plans
patriciasantaana c0aacf3
widget overview
patriciasantaana 006f14d
widget config
patriciasantaana b5649dc
widget mgmt pt 1
patriciasantaana 14be413
widget mgmt pt 2
patriciasantaana 2f973bb
dash
patriciasantaana f464469
Merge branch 'production' into patricia/pcx18133-turnstile-docs-v2
patriciasantaana 7cf90c0
client-side
patriciasantaana 27fa98e
updates
patriciasantaana 379deb3
api
patriciasantaana fd4defe
server side validation updates contd
patriciasantaana 7dfdda1
update structure
patriciasantaana ec91ee8
Merge branch 'production' into patricia/pcx18133-turnstile-docs-v2
patriciasantaana 810dbc1
terraform
patriciasantaana 4a264d1
server-side validation
patriciasantaana 5ad015e
edits
patriciasantaana 96b3886
broken links
patriciasantaana 1866d9b
broken links pt 2
patriciasantaana 20d4044
edits again
patriciasantaana 8deb189
redirects and edits
patriciasantaana 053cbcc
possible broken links
patriciasantaana ebd7969
fix redirect
patriciasantaana b054bc1
fixes
patriciasantaana 3b18b78
Merge branch 'production' into patricia/pcx18133-turnstile-docs-v2
patriciasantaana ea5694e
Merge branch 'production' into patricia/pcx18133-turnstile-docs-v2
patriciasantaana c1e13fc
some edits
patriciasantaana 56a6789
feedback
patriciasantaana 3f4caf4
testing
patriciasantaana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
src/content/docs/turnstile/additional-configuration/index.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| title: Additional configurations | ||
| pcx_content_type: navigation | ||
| sidebar: | ||
| order: 5 | ||
| group: | ||
| hideIndex: true | ||
|
|
||
| --- | ||
|
|
||
| import { DirectoryListing } from "~/components" | ||
|
|
||
| Refer to the following pages for more information about Turnstile's additional configurations: | ||
|
|
||
| <DirectoryListing /> |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| title: Cloudflare Challenges | ||
| pcx_content_type: navigation | ||
| external_link: /cloudflare-challenges/ | ||
| sidebar: | ||
| order: 2 | ||
|
|
||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,107 +1,85 @@ | ||
| --- | ||
| title: Widget | ||
| pcx_content_type: reference | ||
| title: Turnstile widgets | ||
| pcx_content_type: concept | ||
| sidebar: | ||
| order: 1 | ||
|
|
||
| head: | ||
| - tag: title | ||
| content: Overview | ||
patriciasantaana marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| --- | ||
|
|
||
| import { GlossaryTooltip, Render } from "~/components" | ||
|
|
||
| Every instance of Turnstile belongs to a Turnstile widget. It is configured on a per-widget level. Every widget has a mode, a label, a <GlossaryTooltip term="sitekey">sitekey</GlossaryTooltip>, and a <GlossaryTooltip term="secret key">secret key</GlossaryTooltip>. | ||
|
|
||
| The 3 modes for Turnstile are **Managed**, **Non-Interactive**, and **Invisible**. | ||
|
|
||
| Refer to [appearance modes](/turnstile/get-started/client-side-rendering/#appearance-modes) to configure whether to have the widget be always visible or visible only when interaction is required, and to customize your widget theme between automatic, light, or dark mode. | ||
|
|
||
| Widgets can be implemented in normal, flexible, or compact sizes. | ||
|
|
||
| <Render file="widget-size" /> | ||
|
|
||
| Refer to [widget sizes](/turnstile/get-started/client-side-rendering/#widget-size) for an example on how to configure flexible or compact mode. | ||
|
|
||
| :::note[Offlabel] | ||
| Customers with Enterprise Bot Management and Enterprise Turnstile have the ability to remove the Cloudflare branding and customize a specific Turnstile widget via the [API](/api/resources/turnstile/subresources/widgets/methods/update/). | ||
| ::: | ||
| ## Widget components | ||
|
|
||
| ## Availability | ||
| <Render file="widget-components" /> | ||
|
|
||
| Free users are limited to 20 widgets per account. | ||
| ## Widget modes | ||
|
|
||
| Customers with Enterprise Bot Management and Enterprise Turnstile can have this limit increased. Contact your account team to increase your widget limit. | ||
| The available modes for Turnstile widgets are **Managed**, **Non-Interactive**, and **Invisible**. | ||
|
|
||
| ## Widget types | ||
| ### Managed mode (recommended) | ||
|
|
||
| ### Managed (recommended) | ||
| Managed mode is fully managed by Cloudflare. It automatically chooses the appropriate action based on client-side signals and risk levels. Cloudflare uses the information from the visitor to decide if an interactive challenge should be used. | ||
|
|
||
| This mode is fully managed by Cloudflare. It automatically chooses the appropriate action based on various signals and risk levels. Cloudflare will use the information from the visitor to decide if an interactive challenge should be used. Turnstile will only require interaction if a further check is necessary to verify that the visitor is human. When an interaction is required, the user will be prompted to check a box (no images or text to decipher). This managed mode is ideal for users who want a simple configuration without needing to fine-tune the behavior. | ||
| Turnstile will only require interaction if a further check is necessary to verify that the visitor is human. When an interaction is required, the visitor will be prompted to select a box. There will be no images or text to decipher. | ||
|
|
||
| #### Light mode | ||
| Managed mode is ideal for users who want a simple configuration without needing to fine-tune the widget's behavior. | ||
|
|
||
|  | ||
|  | ||
|  | ||
| ### Non-Interactive mode | ||
|
|
||
| #### Dark mode | ||
| Visitors will see a widget with a loading spinner while the challenges run in their browsers. Unlike managed mode, visitors will never be required or prompted to interact with the widget. | ||
|
|
||
|  | ||
|  | ||
|  | ||
| Non-Interactive mode is ideal for users who want to prioritize visitor experience and do not want to add any friction on their website with a Turnstile interaction. | ||
|
|
||
| ### Compact mode | ||
| ### Invisible mode | ||
|
|
||
| You can configure the Turnstile widget in compact mode, which functions in the same way as a Managed widget. | ||
| Invisible mode is similar to Non-Interactive mode where visitors will never interact with the Turnstile widget. Visitors will also not see a widget or any indication that an invisible browser challenge is in progress. | ||
|
|
||
| #### Light mode | ||
| Invisible mode is ideal for users who want to prioritize visitor and visual experience on their website. | ||
|
|
||
|  | ||
|
|
||
| #### Dark mode | ||
|
|
||
|  | ||
|
|
||
| ### Non-Interactive | ||
|
|
||
| Visitors will see a widget with a loading bar while the browser challenges run. Unlike managed mode, visitors will never be required or prompted to interact with the widget. This mode is ideal for users who want to prioritize visitor experience and do not want to add any friction with a Turnstile interaction. | ||
| --- | ||
|
|
||
| #### Light mode | ||
| ## Widget customization | ||
|
|
||
|  | ||
|  | ||
| ### Sizes | ||
|
|
||
| #### Dark mode | ||
| Widgets can be implemented in normal, flexible, or compact sizes. | ||
|
|
||
|  | ||
|  | ||
| Refer to [Widget configurations](/turnstile/get-started/client-side-rendering/widget-configurations/) for detailed configuration options and code examples. | ||
|
|
||
| ### Invisible | ||
| ### Appearance and themes | ||
|
|
||
| This mode is similar to non-interactive mode where visitors will never interact with the Turnstile widget. Visitors will not see a widget or any indication that an invisible browser challenge is in progress. Invisible challenges should take a few seconds to complete. | ||
| Turnstile widgets support multiple appearance modes and themes to match your website's design. Refer to [Widget configurations](/turnstile/get-started/client-side-rendering/widget-configurations/) for implementation details. | ||
|
|
||
| ## Error states | ||
| --- | ||
|
|
||
| ### Unknown error state | ||
| ## Widget states | ||
|
|
||
|  | ||
| ### Normal operation states | ||
|
|
||
| When an unknown error occurs during the challenge, visitors will encounter this widget state. Visitors can refresh and retry the challenge. If the error persists, they can submit a feedback form by selecting **Send feedback** on the widget. | ||
| - **Loading**: Widget is processing the challenge. | ||
| - **Interaction**: Visitor needs to check the box (Managed mode only). | ||
| - **Success**: The Challenge was completed successfully. | ||
|
|
||
| Refer to [Feedback reports](/turnstile/troubleshooting/feedback-reports) for more information. | ||
| ### Error states | ||
|
|
||
| ### Interaction timed out state | ||
| #### Unknown error | ||
|
|
||
|  | ||
| When an unknown error occurs during the challenge, visitors will encounter this widget state. Visitors can follow the troubleshooting guidelines from the widget or refresh the page to retry the challenge. | ||
|
|
||
| When the challenge is not solved for an extended period of time, it must be issued again by reloading the page or the widget. | ||
| #### Interaction timed out | ||
|
|
||
| ### Challenge timed out state | ||
| When the visitor is presented with a checkbox but does not interact with it for an extended period of time. The challenge must be reissued by reloading the page or the widget. | ||
|
|
||
|  | ||
| #### Challenge timed out | ||
|
|
||
| The widget expires when a token was issued but the user did not solve the challenge after an extended period of time. The page or widget must be reloaded. | ||
| When the verification was completed but no further action has been taken, the challenge outcome will no longer be valid. For example, if a Turnstile widget is on a login page and the Turnstile successfully ran, but the visitor did not log in for an extended period of time, the challenge must be reissued by reloading the page or the widget. | ||
|
|
||
| ### Outdated or unsupported browser | ||
| #### Outdated or unsupported browser | ||
|
|
||
|  | ||
| Visitors with outdated browsers or unsupported browsers will encounter this widget state. | ||
|
|
||
| Visitors with outdated browsers or unsupported browsers will encounter this widget state. Refer to [Supported browsers](/cloudflare-challenges/#browser-support) for more information regarding supported browsers. | ||
| Refer to [Supported browsers](/cloudflare-challenges/#browser-support) for more information regarding supported browsers. | ||
patriciasantaana marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| title: Extensions | ||
| pcx_content_type: navigation | ||
| sidebar: | ||
| order: 7 | ||
| order: 9 | ||
| group: | ||
| hideIndex: true | ||
|
|
||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.