[PR #4373] feat(organization): allow client side requests to add-member #5340

Open
opened 2026-03-13 12:19:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4373
Author: @alliefitter
Created: 9/2/2025
Status: 🔄 Open

Base: canaryHead: feat/org-add-member-client-side


📝 Commits (8)

  • 1bf3a11 feat(admin): Allow client side requests to add-member
  • d87a953 fix(organization): Add orgSessionMiddleware.
  • f072967 Merge branch 'canary' into feat/org-add-member-client-side
  • c254ead Merge branch 'canary' into feat/org-add-member-client-side
  • a0a34d2 Merge branch 'canary' into feat/org-add-member-client-side
  • b93a4c1 Merge branch 'canary' into feat/org-add-member-client-side
  • 4e7021c Remove org session middleware.
  • 366a33a Merge branch 'canary' into feat/org-add-member-client-side

📊 Changes

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

View changed files

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

📄 Description

This PR is intended to open a discussion about making /admin/add-member allow client side requests. I wasn't able to find anything in closed PRs that would explain why this is a server only endpoint, so I hoping to discuss allowing client side requests. Thanks!

Summary by cubic

Allow client-side calls to organization.addMember by removing the SERVER_ONLY restriction on the route. Updated tests to use client.organization.addMember, confirming front-end apps can add members without a server proxy.


🔄 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/4373 **Author:** [@alliefitter](https://github.com/alliefitter) **Created:** 9/2/2025 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `feat/org-add-member-client-side` --- ### 📝 Commits (8) - [`1bf3a11`](https://github.com/better-auth/better-auth/commit/1bf3a116c1ee0be7dc5f9ca2653da93d598c8368) feat(admin): Allow client side requests to add-member - [`d87a953`](https://github.com/better-auth/better-auth/commit/d87a953f1a30575da6dea619e6896cc09b425067) fix(organization): Add orgSessionMiddleware. - [`f072967`](https://github.com/better-auth/better-auth/commit/f0729671dd3c4629ba7a24947939fb2a8d116b9f) Merge branch 'canary' into feat/org-add-member-client-side - [`c254ead`](https://github.com/better-auth/better-auth/commit/c254eadf2f50b33d228a0697235e449508d2aa86) Merge branch 'canary' into feat/org-add-member-client-side - [`a0a34d2`](https://github.com/better-auth/better-auth/commit/a0a34d22fc319104e0a441441cc21c68f5dab47b) Merge branch 'canary' into feat/org-add-member-client-side - [`b93a4c1`](https://github.com/better-auth/better-auth/commit/b93a4c1667247e32a9f6e98361b6169b4b3a4eb8) Merge branch 'canary' into feat/org-add-member-client-side - [`4e7021c`](https://github.com/better-auth/better-auth/commit/4e7021c8772b5fd94004833f1d411599ee22ef92) Remove org session middleware. - [`366a33a`](https://github.com/better-auth/better-auth/commit/366a33acb515f396f63c46b50f9366a811402c4c) Merge branch 'canary' into feat/org-add-member-client-side ### 📊 Changes **2 files changed** (+4 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.test.ts` (+4 -6) 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.ts` (+0 -1) </details> ### 📄 Description This PR is intended to open a discussion about making `/admin/add-member` allow client side requests. I wasn't able to find anything in closed PRs that would explain why this is a server only endpoint, so I hoping to discuss allowing client side requests. Thanks! <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Allow client-side calls to organization.addMember by removing the SERVER_ONLY restriction on the route. Updated tests to use client.organization.addMember, confirming front-end apps can add members without a server proxy. <!-- 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 12:19:23 -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#5340