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 AI security platform that ships with your code. Stop bots and automated attacks from burning your AI budget, leaking data, or misusing tools with Arcjet's AI security building blocks.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.