[PR #2570] [MERGED] feat: support API key regeneration #4383

Closed
opened 2026-03-13 11:43:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2570
Author: @LuggaPugga
Created: 5/7/2025
Status: Merged
Merged: 11/5/2025
Merged by: @himself65

Base: canaryHead: feat/api-key/regenerate-apikey


📝 Commits (4)

📊 Changes

6 files changed (+436 additions, -0 deletions)

View changed files

📝 docs/content/docs/plugins/api-key.mdx (+35 -0)
📝 packages/better-auth/src/plugins/api-key/api-key.test.ts (+87 -0)
📝 packages/better-auth/src/plugins/api-key/client.ts (+1 -0)
📝 packages/better-auth/src/plugins/api-key/index.ts (+16 -0)
📝 packages/better-auth/src/plugins/api-key/routes/index.ts (+7 -0)
packages/better-auth/src/plugins/api-key/routes/regenerate-api-key.ts (+290 -0)

📄 Description

This PR introduces the ability to regenerate existing API keys. This enhancement allows users to generate a new key while maintaining the same associated permissions, configurations and id.

If you want me to change anything just let me know.


🔄 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/2570 **Author:** [@LuggaPugga](https://github.com/LuggaPugga) **Created:** 5/7/2025 **Status:** ✅ Merged **Merged:** 11/5/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `feat/api-key/regenerate-apikey` --- ### 📝 Commits (4) - [`6ed30e4`](https://github.com/better-auth/better-auth/commit/6ed30e456bc057fff26a3049f5e47776b1dc1ea1) feat: support API key regeneration - [`8320833`](https://github.com/better-auth/better-auth/commit/8320833bb40f19e2d447ef5a1048f1322142453d) fix: code - [`39fe9cf`](https://github.com/better-auth/better-auth/commit/39fe9cf66fdcdd6cd960c4a0b1014f54e247a791) fix: code - [`6922917`](https://github.com/better-auth/better-auth/commit/6922917540430ecd1727c7c2f80c4a3ded501aa3) fix: code ### 📊 Changes **6 files changed** (+436 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/api-key.mdx` (+35 -0) 📝 `packages/better-auth/src/plugins/api-key/api-key.test.ts` (+87 -0) 📝 `packages/better-auth/src/plugins/api-key/client.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/api-key/index.ts` (+16 -0) 📝 `packages/better-auth/src/plugins/api-key/routes/index.ts` (+7 -0) ➕ `packages/better-auth/src/plugins/api-key/routes/regenerate-api-key.ts` (+290 -0) </details> ### 📄 Description This PR introduces the ability to regenerate existing API keys. This enhancement allows users to generate a new key while maintaining the same associated permissions, configurations and id. If you want me to change anything just let me know. --- <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-03-13 11:43:42 -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#4383