rCTF Docs
Overview

Captcha providers

Configure captcha verification with reCAPTCHA, hCaptcha, or Cloudflare Turnstile.

Captcha providers protect sensitive endpoints from automated abuse. rCTF supports three captcha services.

Configuration#

Captcha configuration has two parts: the provider (which service to use) and the protected endpoints (which actions require verification).

captcha:
provider:
name: captcha/turnstile
options:
siteKey: your-site-key
secretKey: your-secret-key
protectedEndpoints:
- register
- recover

Protected endpoints#

The protectedEndpoints array controls which actions require captcha verification:

ActionDescription
registerNew account registration
recoverAccount recovery via email
setEmailChanging account email
instancerStartStarting a challenge instance
instancerExtendExtending a challenge instance lifetime
avatarUploadUploading a team avatar
adminBotSubmitSubmitting a job to the admin bot

Only the actions listed in protectedEndpoints will require captcha. Unlisted actions proceed without verification.

Providers#

Google reCAPTCHA v2 Invisible. The frontend renders the widget with size: 'invisible' and verifies the response against https://www.google.com/recaptcha/api/siteverify.

captcha:
provider:
name: captcha/recaptcha
options:
siteKey: your-site-key
secretKey: your-secret-key
OptionEnvironment VariableDescription
siteKeyRCTF_RECAPTCHA_SITE_KEYreCAPTCHA site key
secretKeyRCTF_RECAPTCHA_SECRET_KEYreCAPTCHA secret key

hCaptcha verification.

captcha:
provider:
name: captcha/hcaptcha
options:
siteKey: your-site-key
secretKey: your-secret-key
OptionEnvironment VariableDescription
siteKeyRCTF_HCAPTCHA_SITE_KEYhCaptcha site key
secretKeyRCTF_HCAPTCHA_SECRET_KEYhCaptcha secret key

Cloudflare Turnstile verification.

captcha:
provider:
name: captcha/turnstile
options:
siteKey: your-site-key
secretKey: your-secret-key
OptionEnvironment VariableDescription
siteKeyRCTF_TURNSTILE_SITE_KEYTurnstile site key
secretKeyRCTF_TURNSTILE_SECRET_KEYTurnstile secret key

Migrating from v1#

If you are using the legacy recaptcha top-level config from v1, it is automatically converted to the new format at startup. However, migrating is recommended:

recaptcha:
siteKey: your-site-key
secretKey: your-secret-key
protectedActions:
- register
captcha:
provider:
name: captcha/recaptcha
options:
siteKey: your-site-key
secretKey: your-secret-key
protectedEndpoints:
- register
Esc

Start typing to search the docs.