[PR #5950] docs: fix out-dated api-key docs about rate-limits #14591

Closed
opened 2026-04-13 09:32:13 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5950

State: closed
Merged: Yes


Updates the api-key docs regarding rate-limits, also documents how rate-limits apply for get-session requests that use x-api-key.

Linear:
https://linear.app/better-auth/issue/DEV-240/docs-document-api-key-rate-limit-behaviour-when-using-x-api-key


Summary by cubic

Fixes outdated API key rate limit docs and explains how limits apply when sessions are created with x-api-key. Addresses Linear DEV-240.

  • Bug Fixes
    • Clarified where rate limits apply: API key verification and session creation when enableSessionForAPIKeys is on; noted double increment when calling verifyApiKey() and getSession() with x-api-key, with guidance to avoid it.
    • Documented sliding-window behavior and error response (tryAgainIn).
    • Added how to disable rate limits globally or per key, and updated refill/expiration rules.

Written for commit 69dd2b050a. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5950 **State:** closed **Merged:** Yes --- Updates the api-key docs regarding rate-limits, also documents how rate-limits apply for get-session requests that use `x-api-key`. Linear: https://linear.app/better-auth/issue/DEV-240/docs-document-api-key-rate-limit-behaviour-when-using-x-api-key <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes outdated API key rate limit docs and explains how limits apply when sessions are created with x-api-key. Addresses Linear DEV-240. - **Bug Fixes** - Clarified where rate limits apply: API key verification and session creation when enableSessionForAPIKeys is on; noted double increment when calling verifyApiKey() and getSession() with x-api-key, with guidance to avoid it. - Documented sliding-window behavior and error response (tryAgainIn). - Added how to disable rate limits globally or per key, and updated refill/expiration rules. <sup>Written for commit 69dd2b050ad7630e15097dbf79cf2d6604addcc2. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:32:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#14591