twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
Other
20.65k stars 2.27k forks source link

Setup invisible Captcha service on login/signup form #3546

Closed FelixMalfait closed 6 months ago

FelixMalfait commented 10 months ago

We should introduce an invisible Captcha on the login/signup form.

As always we try to have a driver-driven instance to allow each self-hosted instance to pick their provider of choice so let's try to use env variables for the validation URL / KEY (and PROVIDER var eventually if the implementation detail change from one to another).

The 3 services we should look to support are:

i-am-chitti commented 10 months ago

Hi @FelixMalfait, I'm interested in working on this. Please have a review of below notes to be on same page -

To make it driver driven, I'll be taking inspiration from existing drivers like SMTP for email.

One doubt though -

FelixMalfait commented 10 months ago

Legend @i-am-chitti you're everywhere 😅 - thanks!!!

Agree with everything you said. And yes v3.

I just have a doubt on react-helmet, I'm not the most qualified to answer technical questions. What you suggest seems like a nice and clean approach, actually cleaner than what we do here in my opinion: https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/support/components/SupportChat.tsx But it would be great to get confirmation from @lucasbordeau

lucasbordeau commented 10 months ago

Current implementation with insertScript seems fine, although we could extract it in an external hook.

i-am-chitti commented 10 months ago

Thanks @FelixMalfait and @lucasbordeau for the notes. I've started working on this.

FelixMalfait commented 8 months ago

Hey @i-am-chitti let us know if you have questions! I know this isn't a small task and you have other things to do :)

i-am-chitti commented 8 months ago

Hi @FelixMalfait, The backend is ready and on frontend, I've completed integrating the Google recaptcha. Currently, hCaptcha and Turnstile is pending on frontend.

Didn't get time to work on this past two weeks. Just synced my main branch and found I've lots of merge conflicts. I'm resolving them. Will complete the pending integrations and raise PR in some days.