[PR #4595] [MERGED] fix: check endpoint conflicts respect method #31070

Closed
opened 2026-04-17 22:00:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4595
Author: @himself65
Created: 9/11/2025
Status: Merged
Merged: 9/11/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/09/11/fix


📝 Commits (2)

  • f81cf3e fix: check endpoint conflicts respect method
  • 3ec6e6f chore: lint fix

📊 Changes

2 files changed (+221 additions, -29 deletions)

View changed files

📝 packages/better-auth/src/api/check-endpoint-conflicts.test.ts (+157 -20)
📝 packages/better-auth/src/api/index.ts (+64 -9)

📄 Description

Reported by @Bekacru


Summary by cubic

Make endpoint conflict checks method-aware. Same path with different HTTP methods no longer conflicts; same method or wildcard collisions are reported with clearer errors.

  • Bug Fixes
    • Detect conflicts per HTTP method (supports string and array; defaults to "*").
    • No conflict when plugins use the same path with different methods.
    • Detect conflicts for same method on the same path, including within the same plugin.
    • Treat "*" as conflicting with any specific method.
    • Error message now shows conflicting methods and updated guidance.
    • Expanded tests to cover mixed methods, duplicates, and wildcard cases.

🔄 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/4595 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/11/2025 **Status:** ✅ Merged **Merged:** 9/11/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/09/11/fix` --- ### 📝 Commits (2) - [`f81cf3e`](https://github.com/better-auth/better-auth/commit/f81cf3ea675ab7874a8192ed7cd417da7e4e3c7b) fix: check endpoint conflicts respect `method` - [`3ec6e6f`](https://github.com/better-auth/better-auth/commit/3ec6e6f7fae59902eae135738f76ae54bbdbd605) chore: lint fix ### 📊 Changes **2 files changed** (+221 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/check-endpoint-conflicts.test.ts` (+157 -20) 📝 `packages/better-auth/src/api/index.ts` (+64 -9) </details> ### 📄 Description Reported by @Bekacru <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Make endpoint conflict checks method-aware. Same path with different HTTP methods no longer conflicts; same method or wildcard collisions are reported with clearer errors. - **Bug Fixes** - Detect conflicts per HTTP method (supports string and array; defaults to "*"). - No conflict when plugins use the same path with different methods. - Detect conflicts for same method on the same path, including within the same plugin. - Treat "*" as conflicting with any specific method. - Error message now shows conflicting methods and updated guidance. - Expanded tests to cover mixed methods, duplicates, and wildcard cases. <!-- 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 22:00:37 -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#31070