ubicloud/spec/lib
Enes Cakir 69e7ecfd3c Add Cloudflare Turnstile captcha to account creation form
Our account creation form is publicly accessible, and open to abuse by
spammers. The spam bots enter random email addresses and increase our
bounce rate.

We decided to add a captcha to the form to prevent this abuse. I
evaluated a few options and decided to use Cloudflare's Turnstile since
it's free and privacy-friendly. It's also easy to implement. [^1]

We add their client-side widget to our form. This widget add token input
and we use this token to verify the captcha on the server-side.

I added `cloudflare_turnstile.erb` component to add Cloudflare Turnstile
to any form easily. External Cloudflare script is loaded only when the
component is used.

There are 3 different modes for Turnstile: managed, non-interactive, and
invisible [^2]. It's configurable in the Cloudflare UI. I think we can
start with the invisible mode and see how it goes.

[^1]: https://developers.cloudflare.com/turnstile/get-started/
[^2]: https://developers.cloudflare.com/turnstile/concepts/widget/
2024-11-05 13:47:16 +03:00
..
hosting Make Hetzner test ssh key fixture re-use more obvious 2023-12-15 13:54:49 -08:00
minio Remove all skip_if_frozen{_models} calls in the specs 2024-10-30 12:08:24 -07:00
authorization_spec.rb Create new project with managed admin policy instead of custom policy 2024-10-10 16:27:55 +03:00
billing_rate_spec.rb Introduce billing for inference endpoints 2024-10-16 13:56:06 +02:00
clog_spec.rb Remove all skip_if_frozen{_models} calls in the specs 2024-10-30 12:08:24 -07:00
cloudflare_client_spec.rb Manage setup/destroy of the repository's blob storage. 2024-06-28 10:06:23 +03:00
github_spec.rb Bump jwt gem from 2.7.1 to 2.8.0 2024-03-08 15:08:44 +03:00
invoice_generator_spec.rb Fix unit test for invoice generator 2024-08-22 14:41:07 +02:00
monitorable_resource_spec.rb Remove all skip_if_frozen{_models} calls in the specs 2024-10-30 12:08:24 -07:00
pagination_spec.rb Don't accept non-numeric value for page size 2024-04-19 20:54:12 -07:00
sem_snap_spec.rb Remove all skip_if_frozen{_models} calls in the specs 2024-10-30 12:08:24 -07:00
ssh_key_spec.rb Bring ssh_key.rb to 100% line/branch coverage 2023-05-18 09:46:24 +03:00
thread_printer_spec.rb Remove all skip_if_frozen{_models} calls in the specs 2024-10-30 12:08:24 -07:00
util_spec.rb Introduce elliptic curve backwards compatibility code 2024-10-29 07:40:12 -07:00
validation_spec.rb Add Cloudflare Turnstile captcha to account creation form 2024-11-05 13:47:16 +03:00