Skip to content

Signup fails after deploy because of the CAPTCHA: Turnstile, reCAPTCHA, or hCaptcha

Signup works on localhost and fails in production when Turnstile, reCAPTCHA, or hCaptcha rejects the live site. How to check hostnames, mismatched keys, and Supabase's 'captcha verification process failed'.

You shipped an app with Lovable, Bolt, Replit, Cursor, or v0, and signup worked on your machine. After deploy, a new visitor cannot create an account, log in, or reset a password, while the homepage still returns 200. The step that fails is the CAPTCHA: Cloudflare Turnstile, Google reCAPTCHA, or hCaptcha. You miss it on localhost, on a preview host, or with a token the live domain will not issue.

Supabase Auth can protect sign-up, sign-in, and password reset with hCaptcha or Turnstile. reCAPTCHA is not one of those providers. A reCAPTCHA widget is checked by your own server, or it is the wrong widget for the Supabase setting.

How to check in 5 minutes

Use the production URL, not the preview.

  1. In a private window, create an account with a new address. Repeat on a phone in Safari or Chrome, and on both www and the bare domain if both answer.
  2. In the console, Turnstile 110200 means this hostname is not on the widget. 200500 means the iframe never loaded, often because challenges.cloudflare.com is blocked. A Content-Security-Policy error names the host the browser refused.
  3. On submit, /auth/v1/signup, /token, /otp, or /recover should send gotrue_meta_security.captcha_token as a long string. Empty means no token was produced or passed. captcha_failed with captcha protection: request disallowed (...) means the provider rejected it. The parentheses are the provider's code. captcha verification process failed means Auth never finished the call.
  4. Find that same line in the Supabase Auth logs. The site key in the page, the secret under Authentication then Bot and Abuse Protection, and the widget you copied them from have to be one pair.

The live hostname is not allowed

Turnstile refuses a host you did not add. Open the widget, then Settings, then Hostname Management. Write yourapp.com, with no scheme and no path. Wildcards are rejected. Adding yourapp.com also allows www.yourapp.com and deeper subdomains. Adding only www.yourapp.com does not allow the bare domain. A vercel.app preview is not a subdomain of your custom domain, and one preview host is not a subdomain of another, so list each one you still use. A production sitekey should not allow localhost or 127.0.0.1.

reCAPTCHA is limited to the domains on that key, plus their subdomains. yourapp.com covers www.yourapp.com. A preview-only list does not cover the custom domain, and localhost counts only if you added it. No scheme, port, or path. A domain change can take up to 30 minutes.

hCaptcha is open until you opt in. Domain allowlisting is off by default, and the docs say it will be released soon, so an existing sitekey works on every host until you enable it. Then add bare hostnames. yourapp.com covers www and deeper names. Anything else fails with invalid-input-response. hCaptcha refuses localhost and 127.0.0.1. Supabase says to test it through a tunnel or a hosts-file name, and to allow localhost on a Turnstile widget for local tests. That is why it can pass on your machine and refuse production.

The site key and the secret are not a pair

The site key belongs in the page. The secret stays on the server, or in Supabase. They are a pair, and a preview site key with a production secret will not verify. Rebuild after you change the site key. It is usually baked in at build time. If the live page still shows the preview key, see why login works in a Bolt or Replit preview and breaks once it is live.

Turnstile's dummy keys work on any domain, including localhost. The visible always-pass sitekey is 1x00000000000000000000AA and its secret is 1x0000000000000000000000000000000AA. Always-fail dummy keys are documented too. A production secret rejects a dummy token, and a test secret rejects a real one. Search production for x00000000000000000000 and replace both with the live widget.

reCAPTCHA v2's test pair always passes, and the widget shows a warning. The site key is 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI and the secret is 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe. Leave them out of production or every attempt passes and you never see the real failure.

hCaptcha's publisher test sitekey is 10000000-ffff-ffff-ffff-000000000001 with secret 0x0000000000000000000000000000000000000000. It always passes. not-using-dummy-passcode means that sitekey was checked with another secret. sitekey-secret-mismatch means the sitekey is not registered to the secret you sent.

Supabase rejected the token

Under Authentication, then Bot and Abuse Protection, turn on Enable CAPTCHA protection, choose hCaptcha or Turnstile, and paste that provider's secret. A Turnstile secret saved while the dropdown says hCaptcha is the wrong secret for the request Auth makes. reCAPTCHA on the page does not satisfy this switch.

Signup, password login, OTP, and password reset each need a fresh token. The JavaScript client takes it as captchaToken:

await supabase.auth.signUp({
  email,
  password,
  options: { captchaToken },
})

await supabase.auth.signInWithPassword({
  email,
  password,
  options: { captchaToken },
})

await supabase.auth.signInWithOtp({
  email,
  options: { captchaToken },
})

await supabase.auth.resetPasswordForEmail(email, {
  redirectTo: 'https://yourapp.com/update-password',
  captchaToken,
})

Search for those four calls. A generated form often draws the widget and then calls signUp with no token. The provider refuses the empty value, and the API returns captcha_failed with captcha protection: request disallowed (...).

captcha verification process failed means the check never completed: the provider is not hCaptcha or Turnstile, the request errored, or the reply was not JSON. Read the Auth log before editing the form. A reset link that opens localhost, or is already expired, is a different allow list, covered in the password-reset guide.

The token was already used, or it expired

One token, one check. Turnstile tokens last 300 seconds (five minutes), and a replay is timeout-or-duplicate. reCAPTCHA tokens last two minutes and can be verified once. On v3, call execute at submit time. A token from page load can already be dead. hCaptcha reports expired-input-response at a documented default of 120 seconds, and a second use is already-seen-response.

A retry, or a slow form, spends it. Reset hCaptcha after the call (resetCaptcha), as Supabase's guide does for signUp. For Turnstile, call turnstile.reset() and send the new token.

The widget never appears

With a Content-Security-Policy, Turnstile needs https://challenges.cloudflare.com on script-src and frame-src. hCaptcha needs https://hcaptcha.com and https://*.hcaptcha.com on script-src, frame-src, style-src, and connect-src. Do not pin one hCaptcha asset host. Those names change. Google's FAQ says to put a nonce on the reCAPTCHA api.js tag. Add whatever host the console names, then reload.

Turnstile says ad blockers can block its scripts. A private window with extensions off separates that from a bad hostname. 200500 is the blocked iframe.

Turnstile's implicit render looks for cf-turnstile on first load. A view created after a route change needs explicit rendering, after the script loads. Load that script early. reCAPTCHA needs its callback to exist before api.js runs. If the widget is missing after a client-side navigation and present on a full reload, the timing is the bug.

Nothing on screen to click

Invisible Turnstile draws nothing. Managed mode shows a checkbox only when Cloudflare asks, and interaction-only stays hidden until then. Invisible reCAPTCHA has no checkbox either, so a failure is only a callback. If you set that callback, you have to tell the person to retry.

Turnstile needs no extra setup in mobile Safari or Chrome. A WebView needs JavaScript, DOM storage, and access to challenges.cloudflare.com, plus about:blank and about:srcdoc. An in-app browser that drops any of those will not finish the challenge. Repeat the signup in the phone's own browser.

Fix checklist

  • Add the production hostname on Turnstile or reCAPTCHA. On hCaptcha, only after Domain allowlisting is on. The bare domain covers www. www alone does not. Add each preview host too. Turnstile rejects *.vercel.app.
  • Use one production widget's site key and secret. Remove dummy and test keys, then redeploy.
  • In Supabase, select the provider you render, save its secret, and pass a new captchaToken on signup, password login, OTP, and password reset.
  • Reset the widget after every attempt. Do not reuse a token.
  • Allow the widget hosts in Content-Security-Policy, and render after the script loads.
  • Sign up again in a private window, then on a phone in Safari or Chrome.

Paste the live signup URL into the free check. FunnelSitter opens that page in a real browser and reports the HTTP status, console errors, broken links, unfinished buttons, and load time, with a screenshot, and it stops before the form is submitted.