API Key Plugin: Fields marked as 'Optional' seem to be required

Hi, we're attempting to use auth.api.createApiKey with the API Key plugin. We didn't add some of the optional fields (the ones marked optional in the docs: https://www.better-auth.com/docs/plugins/api-key#schema). We've been getting the following error: [Error [BetterAuthError]: The field "start" does not exist in the "apikey" schema. Please update your drizzle schema or re-generate using "npx @better-auth/cli generate".] { cause: undefined } We never added this field in the schema. Is this a potential bug?
API Key | Better Auth
API Key plugin for Better Auth.
1 Reply
Ravi
RaviOP2mo ago
@Matt

Did you find this page helpful?