[PR #1380] [CLOSED] feat: API Key plugin #20685

Closed
opened 2026-04-15 19:51:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1380
Author: @ping-maxwell
Created: 2/7/2025
Status: Closed

Base: mainHead: feat/plugin/api-key


📝 Commits (10+)

  • 1971fea feat(organization): support multiple roles (#1037)
  • 1a492e1 feat: cleanup expired verification data on fetch (#1110)
  • 4ba7229 feat: disable default scopes and allow scopes to be passed on request (#1240)
  • 11739a9 fix(anonymous): link account user and session type should be less strict
  • a265c07 Merge branch 'main' into v1.2
  • 9cbddd1 feat: apiKey plugin (WIP)
  • 0676045 add: update, delete, list functionality & tests
  • be58b76 update: tests
  • a4581c0 add: reroll key functionality
  • 07c1524 tests: update wording

📊 Changes

128 files changed (+5410 additions, -780 deletions)

View changed files

demo/nextjs/app/keys/page.tsx (+574 -0)
📝 demo/nextjs/app/page.tsx (+10 -9)
📝 demo/nextjs/lib/auth-client.ts (+2 -0)
📝 demo/nextjs/lib/auth.ts (+2 -0)
📝 demo/nextjs/package.json (+1 -1)
📝 docs/app/api/og/route.tsx (+2 -2)
📝 docs/components/builder/social-provider.tsx (+36 -0)
📝 docs/components/icons.tsx (+16 -0)
📝 docs/components/mdx/database-tables.tsx (+3 -3)
📝 docs/components/sidebar-content.tsx (+44 -0)
docs/content/docs/authentication/roblox.mdx (+51 -0)
docs/content/docs/authentication/vk.mdx (+48 -0)
📝 docs/content/docs/plugins/admin.mdx (+50 -1)
docs/content/docs/plugins/api-key.mdx (+335 -0)
docs/content/docs/plugins/captcha.mdx (+79 -0)
📝 docs/content/docs/plugins/jwt.mdx (+17 -1)
📝 docs/content/docs/plugins/organization.mdx (+16 -2)
📝 docs/content/docs/plugins/phone-number.mdx (+20 -0)
📝 package.json (+1 -1)
📝 packages/better-auth/package.json (+6 -5)

...and 80 more files

📄 Description

The API Key plugin allows you to create and manage API keys for your application. It provides a way to authenticate and authorize API requests by verifying API keys.

Docs

image

Tests

image

Closes

https://github.com/better-auth/better-auth/issues/1112


🔄 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/1380 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 2/7/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/plugin/api-key` --- ### 📝 Commits (10+) - [`1971fea`](https://github.com/better-auth/better-auth/commit/1971fea65e19a60f2a7db80832218d01928006c3) feat(organization): support multiple roles (#1037) - [`1a492e1`](https://github.com/better-auth/better-auth/commit/1a492e1065ff5e37a228f3c506dab85a75201c84) feat: cleanup expired verification data on fetch (#1110) - [`4ba7229`](https://github.com/better-auth/better-auth/commit/4ba722967b8e57c68e1c8da86f8572b04d5e39a1) feat: disable default scopes and allow scopes to be passed on request (#1240) - [`11739a9`](https://github.com/better-auth/better-auth/commit/11739a9d6cf759e54b0e5773a138f447d300bb91) fix(anonymous): link account user and session type should be less strict - [`a265c07`](https://github.com/better-auth/better-auth/commit/a265c07198b7269f4066677762f43689972c2d63) Merge branch 'main' into v1.2 - [`9cbddd1`](https://github.com/better-auth/better-auth/commit/9cbddd195ac82a0cc8318075a4d02fe3bc619b08) feat: apiKey plugin (WIP) - [`0676045`](https://github.com/better-auth/better-auth/commit/0676045d81845cb47685abd2af33fcfaad15d575) add: update, delete, list functionality & tests - [`be58b76`](https://github.com/better-auth/better-auth/commit/be58b762728c598393c653360b24be5fbae9794c) update: tests - [`a4581c0`](https://github.com/better-auth/better-auth/commit/a4581c09522d22683956b3d9082000a6b4297510) add: reroll key functionality - [`07c1524`](https://github.com/better-auth/better-auth/commit/07c15242d27c20ddbb3f0cbdeef27762ce0b15be) tests: update wording ### 📊 Changes **128 files changed** (+5410 additions, -780 deletions) <details> <summary>View changed files</summary> ➕ `demo/nextjs/app/keys/page.tsx` (+574 -0) 📝 `demo/nextjs/app/page.tsx` (+10 -9) 📝 `demo/nextjs/lib/auth-client.ts` (+2 -0) 📝 `demo/nextjs/lib/auth.ts` (+2 -0) 📝 `demo/nextjs/package.json` (+1 -1) 📝 `docs/app/api/og/route.tsx` (+2 -2) 📝 `docs/components/builder/social-provider.tsx` (+36 -0) 📝 `docs/components/icons.tsx` (+16 -0) 📝 `docs/components/mdx/database-tables.tsx` (+3 -3) 📝 `docs/components/sidebar-content.tsx` (+44 -0) ➕ `docs/content/docs/authentication/roblox.mdx` (+51 -0) ➕ `docs/content/docs/authentication/vk.mdx` (+48 -0) 📝 `docs/content/docs/plugins/admin.mdx` (+50 -1) ➕ `docs/content/docs/plugins/api-key.mdx` (+335 -0) ➕ `docs/content/docs/plugins/captcha.mdx` (+79 -0) 📝 `docs/content/docs/plugins/jwt.mdx` (+17 -1) 📝 `docs/content/docs/plugins/organization.mdx` (+16 -2) 📝 `docs/content/docs/plugins/phone-number.mdx` (+20 -0) 📝 `package.json` (+1 -1) 📝 `packages/better-auth/package.json` (+6 -5) _...and 80 more files_ </details> ### 📄 Description The API Key plugin allows you to create and manage API keys for your application. It provides a way to authenticate and authorize API requests by verifying API keys. # Docs <img width="1897" alt="image" src="https://github.com/user-attachments/assets/c772b7b6-51fa-450f-aa47-4227584542f2" /> # Tests <img width="608" alt="image" src="https://github.com/user-attachments/assets/0f773ee0-1ea4-4833-a960-81ea69a6c62e" /> # Closes https://github.com/better-auth/better-auth/issues/1112 --- <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 19:51:59 -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#20685