Skip to content
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

[turnstile] update behavior of testing secret keys #18707

Open
wants to merge 2 commits into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ A validation error is indicated by having the `success` property set to `false`.
| <div style="width:200px">Error code</div> | Description |
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `missing-input-secret` | The secret parameter was not passed. |
| `invalid-input-secret` | The secret parameter was invalid or did not exist. |
| `invalid-input-secret` | The secret parameter was invalid, did not exist, or is a [testing secret key](/turnstile/troubleshooting/testing) with a non-testing response. |
| `missing-input-response` | The response parameter (token) was not passed. |
| `invalid-input-response` | The response parameter (token) is invalid or has expired. Most of the time, this means a fake token has been used. If the error persists, contact customer support. |
| `bad-request` | The request was rejected because it was malformed. |
| `timeout-or-duplicate` | The response parameter (token) has already been validated before. This means that the token was issued five minutes ago and is no longer valid, or it was already redeemed. |
| `internal-error` | An internal error happened while validating the response. The request can be retried. |
| `internal-error` | An internal error happened while validating the response. The request can be retried. |
3 changes: 2 additions & 1 deletion src/content/docs/turnstile/troubleshooting/testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ Production secret keys will reject this token. You must also use a dummy secret
| `2x0000000000000000000000000000000AA` | Always fails |
| `3x0000000000000000000000000000000AA` | Yields a "token already spent" error |

Dummy secret keys should never be used in production as it will accept any response token as valid.
Dummy secret keys will only accept the `XXXX.DUMMY.TOKEN.XXXX` dummy response token.
If you pass in a real response, it will fail to prevent common misconfigurations.
Loading