1.4.0 "Secondary Storage Support for API Keys" not in Release? #2357

Closed
opened 2026-03-13 09:46:41 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @schaumtier on GitHub (Nov 22, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

hi,

it seams the modifications for "Secondary Storage Support for API Keys" are not in the release, aren't they?

i can see th ecode changes in the canary branch but not in v1.4.0 tag branch...

kind regards

Current vs. Expected behavior

expected:

export const auth = betterAuth({
    secondaryStorage: {
        //...
    },
    plugins: [apiKey({ storage: "secondary-storage" })], 
});

current:

Object literal may only specify known properties, and 'storage' does not exist in type 'ApiKeyOptions'

What version of Better Auth are you using?

1.4.0

System info

better-auth 1.4.0 on linux

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

Backend

Auth config (if applicable)


Additional context

No response

Originally created by @schaumtier on GitHub (Nov 22, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce hi, it seams the modifications for "Secondary Storage Support for API Keys" are not in the release, aren't they? i can see th ecode changes in the canary branch but not in v1.4.0 tag branch... kind regards ### Current vs. Expected behavior expected: ```js export const auth = betterAuth({ secondaryStorage: { //... }, plugins: [apiKey({ storage: "secondary-storage" })], }); ``` current: Object literal may only specify known properties, and 'storage' does not exist in type 'ApiKeyOptions' ### What version of Better Auth are you using? 1.4.0 ### System info ```bash better-auth 1.4.0 on linux ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
Author
Owner

@better-auth-agent[bot] commented on GitHub (Nov 22, 2025):

Hi there, thanks for reporting this! It seems that in version 1.4.0 the Secondary Storage Support for API Keys isn’t fully available yet—specifically, the "storage" option for the API key plugin isn’t recognized by the type definitions. As a troubleshooting step, please verify that you’re using the official release rather than a canary version, and check if there are any recent updates or additional migration instructions in our changelog regarding this feature. In the meantime, you might consider reverting to a previous version where the functionality worked as expected, or testing against the canary branch if immediate secondary storage support is needed. If the problem persists, please tag @bekacru and @ping__ for further investigation. Tag @better-auth-agent if you would like an answer from the Agent. What additional details could you share about your configuration that might help us narrow down the issue further?

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Nov 22, 2025): Hi there, thanks for reporting this! It seems that in version 1.4.0 the Secondary Storage Support for API Keys isn’t fully available yet—specifically, the "storage" option for the API key plugin isn’t recognized by the type definitions. As a troubleshooting step, please verify that you’re using the official release rather than a canary version, and check if there are any recent updates or additional migration instructions in our changelog regarding this feature. In the meantime, you might consider reverting to a previous version where the functionality worked as expected, or testing against the canary branch if immediate secondary storage support is needed. If the problem persists, please tag @bekacru and @ping__ for further investigation. Tag @better-auth-agent if you would like an answer from the Agent. What additional details could you share about your configuration that might help us narrow down the issue further? <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@ping-maxwell commented on GitHub (Nov 22, 2025):

The link was just broken, here is the correct link:

https://canary.better-auth.com/docs/plugins/api-key#storage-modes

@ping-maxwell commented on GitHub (Nov 22, 2025): The link was just broken, here is the correct link: https://canary.better-auth.com/docs/plugins/api-key#storage-modes
Author
Owner

@ping-maxwell commented on GitHub (Nov 22, 2025):

(I just re-read the issue)

Let me check it out.

@ping-maxwell commented on GitHub (Nov 22, 2025): (I just re-read the issue) Let me check it out.
Author
Owner

@ping-maxwell commented on GitHub (Nov 22, 2025):

Any reason you need to use a tag branch?

Not sure why the tag branch may not include it, but you shouldn't have to use that.
Latest version of better-auth has it, and if you're maintaining a fork or something like that, using main will do.

@ping-maxwell commented on GitHub (Nov 22, 2025): Any reason you need to use a tag branch? Not sure why the tag branch may not include it, but you shouldn't have to use that. Latest version of better-auth has it, and if you're maintaining a fork or something like that, using main will do.
Author
Owner

@schaumtier commented on GitHub (Nov 22, 2025):

I don't want to use the tag branch. i installed better-auth in version 1.4.0 but the types there don't have "storage" oder "customStorage" or "fallbackToDatabase" in ApiKeyOptions. I tried "storage" and "customStorage" in my configuration and it didn't work.

@schaumtier commented on GitHub (Nov 22, 2025): I don't want to use the tag branch. i installed better-auth in version 1.4.0 but the types there don't have "storage" oder "customStorage" or "fallbackToDatabase" in ApiKeyOptions. I tried "storage" and "customStorage" in my configuration and it didn't work.
Author
Owner

@Ikram-Maulana commented on GitHub (Nov 22, 2025):

Confirming I am facing the same behavior in v1.4.0.

I am attempting to configure the api-key plugin as follows, but TypeScript throws an error on the storage and fallbackToDatabase property.

It seems the types exported in this release don't match the implementation mentioned in the changelog.

@Ikram-Maulana commented on GitHub (Nov 22, 2025): Confirming I am facing the same behavior in v1.4.0. I am attempting to configure the api-key plugin as follows, but TypeScript throws an error on the `storage` and `fallbackToDatabase` property. It seems the types exported in this release don't match the implementation mentioned in the changelog.
Author
Owner

@ping-maxwell commented on GitHub (Nov 22, 2025):

Interesting, I'll check it out.

@ping-maxwell commented on GitHub (Nov 22, 2025): Interesting, I'll check it out.
Author
Owner

@ping-maxwell commented on GitHub (Nov 22, 2025):

It wasn't properly released to main.

It will be in 1.4.1, sorry for the inconvenience.

@ping-maxwell commented on GitHub (Nov 22, 2025): It wasn't properly released to main. It will be in 1.4.1, sorry for the inconvenience.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2357