[PR #5129] [MERGED] refactor: move RateLimit to core #22697

Closed
opened 2026-04-15 21:13:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5129
Author: @himself65
Created: 10/6/2025
Status: Merged
Merged: 10/6/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/10/06/rate-limit


📝 Commits (1)

  • e2962fc refactor: move RateLimit to core

📊 Changes

3 files changed (+23 additions, -16 deletions)

View changed files

📝 packages/better-auth/src/types/models.ts (+1 -16)
📝 packages/core/src/db/index.ts (+1 -0)
packages/core/src/db/schema/rate-limit.ts (+21 -0)

📄 Description

Summary by cubic

Moved the rate limiting model to @better-auth/core to centralize types and schema. better-auth now re-exports RateLimit from core for consistent usage.

  • Refactors
    • Added rateLimitSchema and RateLimit type to core db.
    • Exported rateLimitSchema and RateLimit from core db index.
    • Removed local RateLimit interface from better-auth and re-exported from core.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5129 **Author:** [@himself65](https://github.com/himself65) **Created:** 10/6/2025 **Status:** ✅ Merged **Merged:** 10/6/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/10/06/rate-limit` --- ### 📝 Commits (1) - [`e2962fc`](https://github.com/better-auth/better-auth/commit/e2962fc61b9064ecd20db177e8fad2b585f9f981) refactor: move RateLimit to core ### 📊 Changes **3 files changed** (+23 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/types/models.ts` (+1 -16) 📝 `packages/core/src/db/index.ts` (+1 -0) ➕ `packages/core/src/db/schema/rate-limit.ts` (+21 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Moved the rate limiting model to @better-auth/core to centralize types and schema. better-auth now re-exports RateLimit from core for consistent usage. - **Refactors** - Added rateLimitSchema and RateLimit type to core db. - Exported rateLimitSchema and RateLimit from core db index. - Removed local RateLimit interface from better-auth and re-exported from core. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:13:17 -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#22697