[PR #6161] fix(organization): make headers required , add error handling test for missing headers in listOrganizations #6489

Open
opened 2026-03-13 13:01:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6161
Author: @rovertrack
Created: 11/21/2025
Status: 🔄 Open

Base: canaryHead: fix/headers


📝 Commits (2)

  • b50636b fix(organization): make headers required , add error handling test for missing headers in listOrganizations
  • 18a3bdd Merge branch 'canary' into fix/headers

📊 Changes

2 files changed (+7 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/organization.test.ts (+6 -0)
📝 packages/better-auth/src/plugins/organization/routes/crud-org.ts (+1 -0)

📄 Description

solves #6157


Summary by cubic

Make headers required on listOrganizations and return a clear error when missing. Addresses #6157 and prevents header-less calls to the organizations API.

  • Bug Fixes
    • Set requireHeaders: true on the listOrganizations route.
    • Added a test that rejects listOrganizations without headers with "Headers is required".

Written for commit 18a3bdd1defd2fc1dc5727abd1e3828d8e34d42a. Summary will update automatically on new commits.


🔄 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/6161 **Author:** [@rovertrack](https://github.com/rovertrack) **Created:** 11/21/2025 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `fix/headers` --- ### 📝 Commits (2) - [`b50636b`](https://github.com/better-auth/better-auth/commit/b50636ba1891b56f7d340a62a5399e58fb073c93) fix(organization): make headers required , add error handling test for missing headers in listOrganizations - [`18a3bdd`](https://github.com/better-auth/better-auth/commit/18a3bdd1defd2fc1dc5727abd1e3828d8e34d42a) Merge branch 'canary' into fix/headers ### 📊 Changes **2 files changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+6 -0) 📝 `packages/better-auth/src/plugins/organization/routes/crud-org.ts` (+1 -0) </details> ### 📄 Description solves **#6157** <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Make headers required on listOrganizations and return a clear error when missing. Addresses #6157 and prevents header-less calls to the organizations API. - **Bug Fixes** - Set requireHeaders: true on the listOrganizations route. - Added a test that rejects listOrganizations without headers with "Headers is required". <sup>Written for commit 18a3bdd1defd2fc1dc5727abd1e3828d8e34d42a. Summary will update automatically on new commits.</sup> <!-- 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-03-13 13:01:00 -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#6489