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

[ISSUE] Be more ISO with other captcha providers #75

Open
maxlerebourg opened this issue May 3, 2024 · 2 comments
Open

[ISSUE] Be more ISO with other captcha providers #75

maxlerebourg opened this issue May 3, 2024 · 2 comments

Comments

@maxlerebourg
Copy link

maxlerebourg commented May 3, 2024

I'm the maintainer of Crowdsec-bouncer-traefik-plugin and some folks ask me to implement mCaptcha provider here.

The front end page to protect user with our plugin, is build like this for every Captcha Provider:

<head>
...
   <script src="{{ .FrontendJS }}" async defer></script>
...
</head>
<body>
...
   <div id="captcha" class="{{ .FrontendKey }}" data-sitekey="{{ .SiteKey }}" data-callback="captchaCallback">
...
   
  <script>
    function captchaCallback() {
      setTimeout(() => document.querySelector('#captcha-form').submit(), 500);
    }
  </script>
</body>

Is it possible to support this kind of setup with mCaptcha ? It would be super efficient if someone want to change from other provider to mCaptcha.

PS: Excellent project, good initiative to build some complete open source Captcha lib !

@realaravinth
Copy link
Member

Thank you for your interest and kind words about mCaptcha :)

Regarding the API, I'll see what I can do. I can't promise an ETA, since I'm kind of busy with work right now, but I'll try to get to it next week.

Could you provide your glue vanilla JS lib from CDN too or put in the README this non official link ?

I'd love to provide an official CDN for mCaptcha, but I don't have the resources for it at the moment. Recommending other CDNs has privacy implications, which I can't do in good conscience 😅

@maxlerebourg
Copy link
Author

maxlerebourg commented Aug 28, 2024

I just open an PR to Glue to try to fix this.
I think this will have a breaking change for vanilla package, I let you review it and modify it if you want.

Documentations to inspire you:

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

No branches or pull requests

2 participants