feat: support FCaptcha verification - #2724
Open
cport1 wants to merge 1 commit into
Open
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add FCaptcha as a third CAPTCHA verification provider for self-hosted Auth deployments.
Design
FCaptcha exposes the same form-encoded Siteverify contract already consumed by Auth for hCaptcha and Turnstile. Unlike those hosted providers, its verification endpoint belongs to the operator, so this adds one provider-specific setting:
SECURITY_CAPTCHA_PROVIDER_URL.When
SECURITY_CAPTCHA_PROVIDER=fcaptcha:secret,response, andremoteipto<base>/siteverifyThe configured URL is administrator-controlled, not request-controlled. HTTP remains supported because self-hosted Auth and FCaptcha commonly communicate over a private container network; operators can use HTTPS for external endpoints.
Client behavior
This change concerns server-side token verification. A custom/self-hosted frontend renders FCaptcha and sends its token through the existing
captcha_tokenrequest field, so the Auth API contract does not change.Validation
go test ./internal/security ./internal/conf ./internal/reloaderhttptestassertion covering the exact Siteverify path and form fieldsDocumentation
README configuration now lists FCaptcha and explains how the provider URL and verify secret map to a self-hosted FCaptcha instance.