Skip to content

Arcjet and 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 AI agent runtime security platform. Discover the agents running in your organization, enforce policy across every action, prompt, and tool call, and keep the evidence to prove what happened. Detect prompt injection, authorize agent tool calls, redact PII, and block bots and abuse.

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.

Discussion