rateLimit custom table issue #1389

Closed
opened 2026-03-13 08:36:39 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @arndesk3 on GitHub (Jun 19, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

I used this to use cutom table and columns for rateLimit

            storage: "database", //"memory" | "database" | "secondary-storage";
	modelName: "aa08_rate_limits",
	fields: {
		key: "key",
		count: "count",
		lastRequest: "last_request",
		// lastRequest: "lastRequest",
	},

Current vs. Expected behavior

⨯ TypeError: Cannot read properties of undefined (reading 'fields')
at E (.next/server/chunks/5614.js:222:65658)
at (.next/server/chunks/5614.js:222:69950)
at Array.map ()
at Object.findMany (.next/server/chunks/5614.js:222:69931)
at async Object.get (.next/server/chunks/5614.js:49:11417)
at async f (.next/server/chunks/5614.js:49:11877)
at async handler (.next/server/chunks/5614.js:78:2925)
at async a (.next/server/app/api/auth/[...all]/route.js:1:1227)
⨯ TypeError: Cannot read properties of undefined (reading 'fields')
at E (.next/server/chunks/5614.js:222:65658)
at (.next/server/chunks/5614.js:222:69950)
at Array.map ()
at Object.findMany (.next/server/chunks/5614.js:222:69931)
at async Object.get (.next/server/chunks/5614.js:49:11417)
at async f (.next/server/chunks/5614.js:49:11877)
at async handler (.next/server/chunks/5614.js:78:2925)
at async a (.next/server/app/api/auth/[...all]/route.js:1:1227)

What version of Better Auth are you using?

v1.2.9

Provide environment information

- Ubuntu 24.04

Which area(s) are affected? (Select all that apply)

Client

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

No response

Originally created by @arndesk3 on GitHub (Jun 19, 2025). ### Is this suited for github? - [ ] Yes, this is suited for github ### To Reproduce I used this to use cutom table and columns for rateLimit storage: "database", //"memory" | "database" | "secondary-storage"; modelName: "aa08_rate_limits", fields: { key: "key", count: "count", lastRequest: "last_request", // lastRequest: "lastRequest", }, ### Current vs. Expected behavior ⨯ TypeError: Cannot read properties of undefined (reading 'fields') at E (.next/server/chunks/5614.js:222:65658) at <unknown> (.next/server/chunks/5614.js:222:69950) at Array.map (<anonymous>) at Object.findMany (.next/server/chunks/5614.js:222:69931) at async Object.get (.next/server/chunks/5614.js:49:11417) at async f (.next/server/chunks/5614.js:49:11877) at async handler (.next/server/chunks/5614.js:78:2925) at async a (.next/server/app/api/auth/[...all]/route.js:1:1227) ⨯ TypeError: Cannot read properties of undefined (reading 'fields') at E (.next/server/chunks/5614.js:222:65658) at <unknown> (.next/server/chunks/5614.js:222:69950) at Array.map (<anonymous>) at Object.findMany (.next/server/chunks/5614.js:222:69931) at async Object.get (.next/server/chunks/5614.js:49:11417) at async f (.next/server/chunks/5614.js:49:11877) at async handler (.next/server/chunks/5614.js:78:2925) at async a (.next/server/app/api/auth/[...all]/route.js:1:1227) ### What version of Better Auth are you using? v1.2.9 ### Provide environment information ```bash - Ubuntu 24.04 ``` ### Which area(s) are affected? (Select all that apply) Client ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the nextjsbug labels 2026-03-13 08:36:39 -05:00
Author
Owner

@Kinfe123 commented on GitHub (Aug 10, 2025):

should be fixed by upgrading to latest.

@Kinfe123 commented on GitHub (Aug 10, 2025): should be fixed by upgrading to latest.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1389