[PR #3606] [CLOSED] feat: add automatic namespacing and conflict detection for plugin routes #30512

Closed
opened 2026-04-17 21:34:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3606
Author: @tinkerer-shubh
Created: 7/25/2025
Status: Closed

Base: mainHead: fix/plugin-route-conflict


📝 Commits (2)

  • a6af8ad core: detect plugin route conflicts and allow automatic namespacing via pluginRoutes.autoNamespace
  • 8e825ad feat: add autoNamespace option to resolve plugin route conflicts

📊 Changes

10 files changed (+160 additions, -12 deletions)

View changed files

📝 packages/better-auth/src/api/index.ts (+39 -10)
📝 packages/better-auth/src/client/config.ts (+13 -1)
📝 packages/better-auth/src/client/proxy.ts (+33 -1)
📝 packages/better-auth/src/client/react/index.ts (+1 -0)
📝 packages/better-auth/src/client/solid/index.ts (+1 -0)
📝 packages/better-auth/src/client/svelte/index.ts (+1 -0)
📝 packages/better-auth/src/client/types.ts (+21 -0)
📝 packages/better-auth/src/client/vanilla.ts (+1 -0)
📝 packages/better-auth/src/client/vue/index.ts (+1 -0)
📝 packages/better-auth/src/types/options.ts (+49 -0)

📄 Description

closes https://github.com/better-auth/better-auth/issues/3595


Summary by cubic

Added automatic namespacing and conflict detection for plugin routes to prevent accidental endpoint collisions. Plugins can now use the new pluginRoutes.autoNamespace option to safely isolate their routes.

  • New Features
    • Detects and blocks duplicate plugin route paths and endpoint keys.
    • Adds pluginRoutes.autoNamespace option to prefix plugin routes and keys with the plugin ID.

🔄 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/3606 **Author:** [@tinkerer-shubh](https://github.com/tinkerer-shubh) **Created:** 7/25/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/plugin-route-conflict` --- ### 📝 Commits (2) - [`a6af8ad`](https://github.com/better-auth/better-auth/commit/a6af8ad8b544b140830af3c8a7d8450cef5ac358) core: detect plugin route conflicts and allow automatic namespacing via pluginRoutes.autoNamespace - [`8e825ad`](https://github.com/better-auth/better-auth/commit/8e825aded39955f95ee1ee6fd26730f49a17e1bc) feat: add autoNamespace option to resolve plugin route conflicts ### 📊 Changes **10 files changed** (+160 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/index.ts` (+39 -10) 📝 `packages/better-auth/src/client/config.ts` (+13 -1) 📝 `packages/better-auth/src/client/proxy.ts` (+33 -1) 📝 `packages/better-auth/src/client/react/index.ts` (+1 -0) 📝 `packages/better-auth/src/client/solid/index.ts` (+1 -0) 📝 `packages/better-auth/src/client/svelte/index.ts` (+1 -0) 📝 `packages/better-auth/src/client/types.ts` (+21 -0) 📝 `packages/better-auth/src/client/vanilla.ts` (+1 -0) 📝 `packages/better-auth/src/client/vue/index.ts` (+1 -0) 📝 `packages/better-auth/src/types/options.ts` (+49 -0) </details> ### 📄 Description closes https://github.com/better-auth/better-auth/issues/3595 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added automatic namespacing and conflict detection for plugin routes to prevent accidental endpoint collisions. Plugins can now use the new pluginRoutes.autoNamespace option to safely isolate their routes. - **New Features** - Detects and blocks duplicate plugin route paths and endpoint keys. - Adds pluginRoutes.autoNamespace option to prefix plugin routes and keys with the plugin ID. <!-- 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-17 21:34:38 -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#30512