Arcjet / Better Auth integration
Arcjet can protect your Better Auth routes from brute force attacks, signup spam and other abuse. You can also use the authenticated user ID to implement user-specific rate limits.
What is Arcjet?
Arcjet helps developers protect their apps in just a few lines of code. Bot detection. Rate limiting. Email validation. Attack protection. Data redaction. A developer-first approach to security.Example app
Section titled “Example app”See an example Next.js + Better Auth implementation on GitHub.
Better Auth hook
Section titled “Better Auth hook”We recommend integrating Arcjet in the auth route handler rather than a Better Auth Hook because hooks do not provide sufficient request context in server-only environments.