[GH-ISSUE #8801] api-key prefix should be disabled by default #28517

Open
opened 2026-04-17 19:58:16 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @ping-maxwell on GitHub (Mar 27, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/8801

Originally assigned to: @ping-maxwell on GitHub.

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

This is opened for tracking purposes.

In 1.6 api-keys will make client-set prefixes throw an error unless enabled in the plugin config.

Current vs. Expected behavior

there could be cases where prefixes must be explicitally defined so client-set keys with custom prefixs could break this flow.

What version of Better Auth are you using?

latest

System info

-

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

Backend

Auth config (if applicable)

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

Additional context

No response

Originally created by @ping-maxwell on GitHub (Mar 27, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/8801 Originally assigned to: @ping-maxwell on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce This is opened for tracking purposes. In 1.6 api-keys will make client-set prefixes throw an error unless enabled in the plugin config. ### Current vs. Expected behavior there could be cases where prefixes must be explicitally defined so client-set keys with custom prefixs could break this flow. ### What version of Better Auth are you using? latest ### System info ```bash - ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the readyenhancementsecurity labels 2026-04-17 19:58: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#28517