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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feature: Captcha verification #1

Closed
Meldiron opened this issue Jun 11, 2022 · 2 comments
Closed

馃殌 Feature: Captcha verification #1

Meldiron opened this issue Jun 11, 2022 · 2 comments

Comments

@Meldiron
Copy link
Contributor

Meldiron commented Jun 11, 2022

To prevent spamming, some contact forms implement human verification tools such as reCAPTCHA v2, hCaptcha, and others.

I am proposing a feature in FormEasy to allow communication with these captcha servers to validate form submissions.

One way of implementing it I can see is to update FormEasy.action(req); function with new options parameter:

const options = {
  captcha: "recaptcha_v2",
  captchaConfig: { secretKey: "........." }
};

FormEasy.action(req, options);

FormEasy would then look for proper implementation of specific captcha on a website.. That can be verified by looking at JSON data, and for instance, looking for g-recaptcha-response key in the case of Recaptcha V2.

Finally FormEasy talks to API servers to verify the token from captcha.

(all of that properly documented, of course)

Would you be interested in this feature inside FormEasy? I would love to contribute to this feature in my free time.

@Basharath
Copy link
Owner

Hi Meldiron,

So glad to see the first contribution request :)

Having a spam filter while submitting these forms is a great idea.
Please add whatever you think is relevant to implement this feature.

For testing it you can do it directly inside the doPost function while using this library and once it works fine include that code in main Code.js file of this library and make a pull request and I'll verify the same from my end and then make a new version to this library with this feature.

Thank you for taking the time to contact and feel free to make your contributions to make this useful for all.

See you!

@Basharath
Copy link
Owner

Captcha validation is available through FormEasy version 2.

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