Skip to content

feat: add Cloudflare Turnstile bot protection to auth forms - #364

Merged
vincentgrobler merged 1 commit into
mainfrom
feature/turnstile-bot-protection
Apr 21, 2026
Merged

feat: add Cloudflare Turnstile bot protection to auth forms#364
vincentgrobler merged 1 commit into
mainfrom
feature/turnstile-bot-protection

Conversation

@vincentgrobler

@vincentgrobler vincentgrobler commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Install @marsidev/react-turnstile for React Turnstile widget
  • SignupForm: add Turnstile widget with dark theme, token capture, reset on error
  • LoginForm: add Turnstile widget with same pattern
  • useAuth: add captchaToken parameter to signIn() and signUp()
  • .env.example: add VITE_TURNSTILE_SITE_KEY
  • Opt-in: only renders if VITE_TURNSTILE_SITE_KEY is set
  • Requires Supabase Dashboard → Auth → Bot Protection → Turnstile secret key

Related Issue

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📝 Documentation update
  • ♻️ Refactor (no functional changes)
  • 🧪 Test update

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Browser testing (specify browsers)

Screenshots (if applicable)

Checklist

  • My code follows the project's coding standards
  • I have run npm run lint and there are no errors
  • I have run npm run test and all tests pass
  • I have added tests for my changes (if applicable)
  • I have updated the documentation (if applicable)
  • My source files have AGPL licence headers
  • My changes generate no new TypeScript errors

- Install @marsidev/react-turnstile for React Turnstile widget
- SignupForm: add Turnstile widget with dark theme, token capture, reset on error
- LoginForm: add Turnstile widget with same pattern
- useAuth: add captchaToken parameter to signIn() and signUp()
- .env.example: add VITE_TURNSTILE_SITE_KEY
- Opt-in: only renders if VITE_TURNSTILE_SITE_KEY is set
- Requires Supabase Dashboard → Auth → Bot Protection → Turnstile secret key
@vercel

vercel Bot commented Apr 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
crewform Ready Ready Preview, Comment Apr 21, 2026 4:42pm

@vincentgrobler
vincentgrobler merged commit 3324a14 into main Apr 21, 2026
8 checks passed
@vincentgrobler
vincentgrobler deleted the feature/turnstile-bot-protection branch April 21, 2026 16:44
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

Successfully merging this pull request may close these issues.

1 participant