ubicloud/views/auth
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
..
create_account.erb Add Cloudflare Turnstile captcha to account creation form 2024-11-05 13:47:16 +03:00
login.erb Convert rodauth login and password fields to components 2023-12-04 15:19:50 +03:00
otp_auth.erb Configure OTP authentication in rodauth 2023-12-09 14:04:47 +03:00
recovery_auth.erb Configure recovery code authentication in rodauth 2023-12-09 14:04:47 +03:00
reset_password.erb Convert rodauth login and password fields to components 2023-12-04 15:19:50 +03:00
reset_password_request.erb Convert rodauth login and password fields to components 2023-12-04 15:19:50 +03:00
two_factor_auth.erb Enable two-factor authentication in rodauth 2023-12-09 14:04:47 +03:00
verify_account.erb Convert rodauth login and password fields to components 2023-12-04 15:19:50 +03:00
verify_account_resend.erb Convert rodauth login and password fields to components 2023-12-04 15:19:50 +03:00
verify_login_change.erb Make account page submenu more responsive 2024-02-14 10:12:59 +03:00
webauthn_auth.erb Configure WebAuthn authentication in rodauth 2023-12-09 14:04:47 +03:00