[PR #8318] [CLOSED] feat: add meaningful prefixes to verification API identifiers #7895

Closed
opened 2026-03-13 13:52:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8318
Author: @himself65
Created: 3/3/2026
Status: Closed

Base: canaryHead: worktree-verification-api-prefixes


📝 Commits (1)

  • b128c33 feat: add meaningful prefixes to verification API identifiers

📊 Changes

7 files changed (+36 additions, -30 deletions)

View changed files

📝 packages/better-auth/src/plugins/magic-link/index.ts (+11 -5)
📝 packages/better-auth/src/plugins/magic-link/magic-link.test.ts (+2 -2)
📝 packages/better-auth/src/plugins/mcp/authorize.ts (+1 -1)
📝 packages/better-auth/src/plugins/mcp/index.ts (+3 -3)
📝 packages/better-auth/src/plugins/oidc-provider/authorize.ts (+1 -1)
📝 packages/better-auth/src/plugins/oidc-provider/index.ts (+7 -7)
📝 packages/better-auth/src/plugins/phone-number/routes.ts (+11 -11)

📄 Description

Summary

Follow-up to #7600 — extends the magic-link: prefix pattern to all plugins that store data in the shared verification table without a meaningful prefix.

  • magic-link: adds magic-link:${token} prefix with backward-compatibility fallback for tokens stored before this change
  • phone-number: adds phone-number:${phoneNumber} prefix (basic OTP) and phone-number:${phoneNumber}:request-password-reset (password reset OTP)
  • oidc-provider: adds oidc-code:${code} prefix for authorization codes (both initial store and consent-flow update)
  • mcp: adds mcp-code:${code} prefix for authorization codes

Already had prefixes (no changes needed): one-time-token:, siwe:, email-verification-otp-/dynamic OTP prefixes, 2fa-otp-, trust-device-, reset-password:, 2fa-.

Test plan

  • All existing magic-link tests pass (16 tests)
  • All existing phone-number tests pass (26 tests)
  • All existing oidc-provider tests pass (35 tests)
  • All existing mcp tests pass (36 tests)

🔄 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/8318 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/3/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `worktree-verification-api-prefixes` --- ### 📝 Commits (1) - [`b128c33`](https://github.com/better-auth/better-auth/commit/b128c3399133fe83bc0b93a4cf551c797285be17) feat: add meaningful prefixes to verification API identifiers ### 📊 Changes **7 files changed** (+36 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/magic-link/index.ts` (+11 -5) 📝 `packages/better-auth/src/plugins/magic-link/magic-link.test.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/mcp/authorize.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/mcp/index.ts` (+3 -3) 📝 `packages/better-auth/src/plugins/oidc-provider/authorize.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/oidc-provider/index.ts` (+7 -7) 📝 `packages/better-auth/src/plugins/phone-number/routes.ts` (+11 -11) </details> ### 📄 Description ## Summary Follow-up to #7600 — extends the `magic-link:` prefix pattern to all plugins that store data in the shared `verification` table without a meaningful prefix. - **magic-link**: adds `magic-link:${token}` prefix with backward-compatibility fallback for tokens stored before this change - **phone-number**: adds `phone-number:${phoneNumber}` prefix (basic OTP) and `phone-number:${phoneNumber}:request-password-reset` (password reset OTP) - **oidc-provider**: adds `oidc-code:${code}` prefix for authorization codes (both initial store and consent-flow update) - **mcp**: adds `mcp-code:${code}` prefix for authorization codes Already had prefixes (no changes needed): `one-time-token:`, `siwe:`, `email-verification-otp-`/dynamic OTP prefixes, `2fa-otp-`, `trust-device-`, `reset-password:`, `2fa-`. ## Test plan - [x] All existing magic-link tests pass (16 tests) - [x] All existing phone-number tests pass (26 tests) - [x] All existing oidc-provider tests pass (35 tests) - [x] All existing mcp tests pass (36 tests) --- <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 13:52:31 -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#7895