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 is the runtime policy engine for AI features. Authorize tools, control budgets, and protect against spam and bots. A developer-first approach to securing AI applications.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.