[PR #3579] [CLOSED] feat(api-key): implement flexible key storage options for API keys #21794

Closed
opened 2026-04-15 20:36:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3579
Author: @Bekacru
Created: 7/24/2025
Status: Closed

Base: mainHead: feat/api-key-storage


📝 Commits (1)

  • c1b9c5d feat(api-key): implement flexible key storage options for API keys

📊 Changes

6 files changed (+127 additions, -38 deletions)

View changed files

📝 packages/better-auth/src/plugins/api-key/api-key.test.ts (+2 -2)
📝 packages/better-auth/src/plugins/api-key/index.ts (+58 -8)
📝 packages/better-auth/src/plugins/api-key/routes/create-api-key.ts (+3 -2)
📝 packages/better-auth/src/plugins/api-key/routes/index.ts (+7 -2)
📝 packages/better-auth/src/plugins/api-key/routes/verify-api-key.ts (+44 -17)
📝 packages/better-auth/src/plugins/api-key/types.ts (+13 -7)

📄 Description

Summary by cubic

Added support for flexible API key storage options, allowing keys to be stored as hashed, plain, encrypted, or with custom logic.

  • New Features
    • Introduced the storeKey option to control how API keys are stored and verified.
    • Updated API key creation and verification to support all storage methods.

🔄 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/3579 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 7/24/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/api-key-storage` --- ### 📝 Commits (1) - [`c1b9c5d`](https://github.com/better-auth/better-auth/commit/c1b9c5d73be1e0b84e05c411a55c26de7ce99c09) feat(api-key): implement flexible key storage options for API keys ### 📊 Changes **6 files changed** (+127 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/api-key/api-key.test.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/api-key/index.ts` (+58 -8) 📝 `packages/better-auth/src/plugins/api-key/routes/create-api-key.ts` (+3 -2) 📝 `packages/better-auth/src/plugins/api-key/routes/index.ts` (+7 -2) 📝 `packages/better-auth/src/plugins/api-key/routes/verify-api-key.ts` (+44 -17) 📝 `packages/better-auth/src/plugins/api-key/types.ts` (+13 -7) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Added support for flexible API key storage options, allowing keys to be stored as hashed, plain, encrypted, or with custom logic. - **New Features** - Introduced the `storeKey` option to control how API keys are stored and verified. - Updated API key creation and verification to support all storage methods. <!-- End of auto-generated description by cubic. --> --- <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-15 20:36:25 -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#21794