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

Add HCaptcha and ReCaptcha V3 and refacto ReCaptcha V2 #421

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

midiland
Copy link

Hello,
Here is with a PR, for Hcaptcha support of ReCaptcha V2 and ReCaptchaV3.

I used the factory paterne, to give a possibility of other Captcha service implementation

Warning: I had to modify the structure of the staticman.yml file

For HCaptcha

 # use Captcha you can use ReCaptcha or HCaptcha 
  captcha:
    enabled: true
    service: HCaptcha
    HCaptcha:
      secret: Secret 

For ReCaptchaV2

 # use Captcha you can use ReCaptcha or HCaptcha 
  captcha:
    enabled: true
    service: ReCaptcha
    ReCaptcha:
      secret: Secret
      version: V2

For ReCaptchaV3

 # use Captcha you can use ReCaptcha or HCaptcha 
  captcha:
    enabled: true
    service: ReCaptcha
    ReCaptcha:
      secret: Secret 
      version: V3
      score: 0.5

I also updated the tests.

Don't hesitate to give me feedback.

@JonBoyleCoding
Copy link

JonBoyleCoding commented Feb 6, 2023

I was just looking at this for myself @midiland, but I believe this commit has too many conflicts as it's from a branch where you have re-organised the file/folder structure.

I'd be interested in this for myself if it could be easily merged in though ;). I don't know enough about javascript to understand without a ton of effort unfortunately.

EDIT: Oh wait, you're pulling into Dev branch - I was trying to merge into master. Stupid me ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants