Skip to content

Commit 0c8a9b1

Browse files
[turnstile] update behavior of testing secret keys (#18707)
* update behavior of testing secret keys * slightly update wording * Update src/content/docs/turnstile/troubleshooting/testing.mdx --------- Co-authored-by: Patricia Santa Ana <[email protected]>
1 parent 080a48e commit 0c8a9b1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/content/docs/turnstile/get-started/server-side-validation.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,9 @@ A validation error is indicated by having the `success` property set to `false`.
290290
| <div style="width:200px">Error code</div> | Description |
291291
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
292292
| `missing-input-secret` | The secret parameter was not passed. |
293-
| `invalid-input-secret` | The secret parameter was invalid or did not exist. |
293+
| `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. |
294294
| `missing-input-response` | The response parameter (token) was not passed. |
295295
| `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. |
296296
| `bad-request` | The request was rejected because it was malformed. |
297297
| `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. |
298-
| `internal-error` | An internal error happened while validating the response. The request can be retried. |
298+
| `internal-error` | An internal error happened while validating the response. The request can be retried. |

src/content/docs/turnstile/troubleshooting/testing.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ Production secret keys will reject this token. You must also use a dummy secret
3636
| `2x0000000000000000000000000000000AA` | Always fails |
3737
| `3x0000000000000000000000000000000AA` | Yields a "token already spent" error |
3838

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

0 commit comments

Comments
 (0)