[PR #1232] [MERGED] fix(rate-limiter): convert bigint lastRequest to number #29303

Closed
opened 2026-04-17 20:40:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1232
Author: @ammarmbe
Created: 1/16/2025
Status: Merged
Merged: 1/17/2025
Merged by: @Bekacru

Base: mainHead: fix/bigint


📝 Commits (1)

  • de20edf fix(rate-limiter): convert bigint lastRequest to number

📊 Changes

1 file changed (+5 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/api/rate-limiter/index.ts (+5 -0)

📄 Description

This pull request includes a change to the createDBStorage function in the packages/better-auth/src/api/rate-limiter/index.ts file. The change ensures that the lastRequest field returned from db is converted from a bigint to a number before use in TypeScript.

Closes #1231


🔄 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/1232 **Author:** [@ammarmbe](https://github.com/ammarmbe) **Created:** 1/16/2025 **Status:** ✅ Merged **Merged:** 1/17/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/bigint` --- ### 📝 Commits (1) - [`de20edf`](https://github.com/better-auth/better-auth/commit/de20edf8b4be3b6d26140e9fd14f0ab573b8989d) fix(rate-limiter): convert bigint lastRequest to number ### 📊 Changes **1 file changed** (+5 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/rate-limiter/index.ts` (+5 -0) </details> ### 📄 Description This pull request includes a change to the `createDBStorage` function in the `packages/better-auth/src/api/rate-limiter/index.ts` file. The change ensures that the `lastRequest` field returned from db is converted from a `bigint` to a `number` before use in TypeScript. Closes #1231 * [`packages/better-auth/src/api/rate-limiter/index.ts`](diffhunk://#diff-266a45270a21e4b11dcd53ed439c47158c823a5305a589055fa2307f5a543d44R47-R51): Added a check to convert `lastRequest` from `bigint` to `number` if necessary. --- <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-17 20:40:18 -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#29303