diff --git a/docs/content/docs/concepts/rate-limit.mdx b/docs/content/docs/concepts/rate-limit.mdx index 1f3036aa0c..9daf768790 100644 --- a/docs/content/docs/concepts/rate-limit.mdx +++ b/docs/content/docs/concepts/rate-limit.mdx @@ -21,6 +21,17 @@ export const auth = betterAuth({ }) ``` +Rate limiting is disabled in development mode by default. In order to enable it, set `enabled` to `true`: + +```ts title="auth.ts" +export const auth = betterAuth({ + rateLimit: { + enabled: true, + //...other options + }, +}) +``` + In addition to the default settings, Better Auth provides custom rules for specific paths. For example: - `/sign-in/email`: Is limited to 3 requests within 10 seconds. @@ -202,4 +213,4 @@ Table Name: `rateLimit` type: "bigint", description: "Max requests in the window" }]} - /> \ No newline at end of file + />