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

Open
opened 2026-04-17 21:55:20 -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: mainHead: feat/org-add-member-client-side


📝 Commits (3)

  • 2d2c919 feat(admin): Allow client side requests to add-member
  • 2bf1221 fix(organization): Add orgSessionMiddleware.
  • fd79cfb Remove org session middleware.

📊 Changes

1 file changed (+4 additions, -6 deletions)

View changed files

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

📄 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

Enable client-side requests to /admin/add-member by removing the server-only restriction. Updated tests to use client.organization.addMember, confirming front-end apps can add members without a server proxy; org session middleware is not required.

Written for commit fd79cfb16d. Summary will update 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/4373 **Author:** [@alliefitter](https://github.com/alliefitter) **Created:** 9/2/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/org-add-member-client-side` --- ### 📝 Commits (3) - [`2d2c919`](https://github.com/better-auth/better-auth/commit/2d2c919a29d57cbda36854081a12284f5676a475) feat(admin): Allow client side requests to add-member - [`2bf1221`](https://github.com/better-auth/better-auth/commit/2bf12218994a8d1fbc3dbd234aafa122a0dc20fe) fix(organization): Add orgSessionMiddleware. - [`fd79cfb`](https://github.com/better-auth/better-auth/commit/fd79cfb16d29aea2be5b440da4bb67954b77b15e) Remove org session middleware. ### 📊 Changes **1 file changed** (+4 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.test.ts` (+4 -6) </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 Enable client-side requests to `/admin/add-member` by removing the server-only restriction. Updated tests to use `client.organization.addMember`, confirming front-end apps can add members without a server proxy; org session middleware is not required. <sup>Written for commit fd79cfb16d29aea2be5b440da4bb67954b77b15e. Summary will update 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-04-17 21:55:20 -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#30941