[PR #2432] [MERGED] fix(api-key): pass real rateLimitvalue from ctx.body #12564

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2432
Author: @Siumauricio
Created: 4/25/2025
Status: Merged
Merged: 5/7/2025
Merged by: @Bekacru

Base: mainHead: fix/rate-limit-always-true-in-db


📝 Commits (4)

  • 2576091 fix(api-key): pass real rateLimitvalue from ctx.body
  • 8388a63 test(api-key): add assertions for rate limit properties in api-key tests
  • 3b8f72f fix(api-key): use nullish coalescing for rateLimitEnabled default value
  • 81753d3 test(api-key): add test for rateLimit configuration from plugin options

📊 Changes

2 files changed (+62 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/plugins/api-key/api-key.test.ts (+59 -0)
📝 packages/better-auth/src/plugins/api-key/routes/create-api-key.ts (+3 -3)

📄 Description

Ensures the rateLimitEnabled property in the ApiKey schema accurately reflects the provided input value, prioritizing it over defaults.

I noticed the value in the database was always true, linked issue to dokploy https://github.com/Dokploy/dokploy/issues/1757


🔄 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/2432 **Author:** [@Siumauricio](https://github.com/Siumauricio) **Created:** 4/25/2025 **Status:** ✅ Merged **Merged:** 5/7/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/rate-limit-always-true-in-db` --- ### 📝 Commits (4) - [`2576091`](https://github.com/better-auth/better-auth/commit/2576091bb38a279ad14f577eb4e18e7772768d54) fix(api-key): pass real rateLimitvalue from ctx.body - [`8388a63`](https://github.com/better-auth/better-auth/commit/8388a63129f483e6600407f5b25056e13a13ca95) test(api-key): add assertions for rate limit properties in api-key tests - [`3b8f72f`](https://github.com/better-auth/better-auth/commit/3b8f72f43e97d3c952bc9ab614f11efa10dbca12) fix(api-key): use nullish coalescing for rateLimitEnabled default value - [`81753d3`](https://github.com/better-auth/better-auth/commit/81753d32f6ec34fed04f702a15afc1a6cde4bd4f) test(api-key): add test for rateLimit configuration from plugin options ### 📊 Changes **2 files changed** (+62 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/api-key/api-key.test.ts` (+59 -0) 📝 `packages/better-auth/src/plugins/api-key/routes/create-api-key.ts` (+3 -3) </details> ### 📄 Description Ensures the `rateLimitEnabled` property in the ApiKey schema accurately reflects the provided input value, prioritizing it over defaults. I noticed the value in the database was always true, linked issue to dokploy https://github.com/Dokploy/dokploy/issues/1757 --- <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-13 08:28:09 -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#12564