[PR #6761] [CLOSED] Fix: Add bulk user inviting to an organization #23772

Closed
opened 2026-04-15 21:58:04 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6761
Author: @Deep070203
Created: 12/14/2025
Status: Closed

Base: mainHead: fix/issue-6753-9ab28c1c


📝 Commits (10+)

  • 9b556f3 fix: add helper types to exports (#6479)
  • df77185 chore: release v1.4.5-beta.2
  • d858977 chore: release v1.4.6-beta.1
  • 4d83402 Revert "ci: remove NODE_AUTH_TOKEN during publish (#6475)"
  • dba28cd chore: release v1.4.6-beta.2
  • 6c83eca refactor: move adapter-factory to core (#6477)
  • b4f4584 fix: avoid throwing on client side (#6361)
  • 58e886c docs: correct spelling of 'Tiktok' to 'TikTok' (#6485)
  • 99d3e59 fix(db): correctly unwrap validator result in schema parsing (#6488)
  • 6276a74 docs: add middleware section for TanStack Start (#6495)

📊 Changes

383 files changed (+25140 additions, -15723 deletions)

View changed files

📝 .cspell/custom-words.txt (+2 -1)
📝 .cspell/third-party.txt (+3 -1)
📝 .github/workflows/adapter-tests.yml (+3 -3)
📝 .github/workflows/auto-cherry-pick-to-main.yml (+1 -1)
📝 .github/workflows/cherry-pick-to-main.yml (+1 -1)
📝 .github/workflows/ci.yml (+18 -10)
📝 .github/workflows/e2e.yml (+7 -7)
📝 .github/workflows/preview.yml (+3 -3)
📝 .github/workflows/release.yml (+5 -4)
📝 README.md (+0 -1)
📝 biome.json (+3 -1)
context7.json (+4 -0)
📝 demo/expo/metro.config.js (+0 -1)
📝 demo/nextjs/app/(auth)/forget-password/page.tsx (+1 -1)
📝 demo/nextjs/app/(auth)/two-factor/otp/page.tsx (+1 -1)
📝 demo/nextjs/app/admin/page.tsx (+0 -7)
📝 demo/nextjs/app/apps/register/page.tsx (+1 -12)
📝 demo/nextjs/app/dashboard/organization-card.tsx (+0 -3)
📝 demo/nextjs/app/dashboard/user-card.tsx (+5 -5)
📝 demo/nextjs/app/globals.css (+62 -4)

...and 80 more files

📄 Description

    ## AI Generated Fix for #6753
    
    ### Analysis
    The current API only supports inviting a single member via authClient.organization.inviteMember which accepts a single email string. To enable bulk invitations, we need to extend the client to accept an array of emails. This can be done by updating the inviteMember method to allow a string or string[] and by adding a new inviteMembers convenience method that forwards an array of emails to the same endpoint, reducing the number of HTTP requests. The change includes updating TypeScript types, the method implementation, and exporting the new method.
    
    ### Changes
    - packages/better-auth/src/client/organization.ts
    
    Generated by Fix AI Bot 🤖

Summary by cubic

Adds bulk user invitations to organizations, letting admins invite multiple emails in one request to speed up onboarding and reduce API calls.

  • New Features
    • organization.inviteMember now accepts a single email or an array of emails.
    • Added organization.inviteMembers for batch invites; updated TypeScript types and exports.

Written for commit 00ede9037a. 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/6761 **Author:** [@Deep070203](https://github.com/Deep070203) **Created:** 12/14/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/issue-6753-9ab28c1c` --- ### 📝 Commits (10+) - [`9b556f3`](https://github.com/better-auth/better-auth/commit/9b556f3d970b1f8191b92f8c382d2ef087069922) fix: add helper types to exports (#6479) - [`df77185`](https://github.com/better-auth/better-auth/commit/df7718558fe28cfc4d260cb3553e822da90eb7ac) chore: release v1.4.5-beta.2 - [`d858977`](https://github.com/better-auth/better-auth/commit/d8589776bd89289a3c1662d292ce676d393b7b0b) chore: release v1.4.6-beta.1 - [`4d83402`](https://github.com/better-auth/better-auth/commit/4d834026dac0ea80c133976c4cfbeb3111ea6364) Revert "ci: remove `NODE_AUTH_TOKEN` during publish (#6475)" - [`dba28cd`](https://github.com/better-auth/better-auth/commit/dba28cd2317aa227c870468d0e5c72e9be4c3c73) chore: release v1.4.6-beta.2 - [`6c83eca`](https://github.com/better-auth/better-auth/commit/6c83eca2a003e435cf09748b66d2da828f824c51) refactor: move adapter-factory to core (#6477) - [`b4f4584`](https://github.com/better-auth/better-auth/commit/b4f45848d14ca9bb4b7bb601b3721d09fd7fc4b3) fix: avoid throwing on client side (#6361) - [`58e886c`](https://github.com/better-auth/better-auth/commit/58e886c2029c79ec75d0bdf67934e525925d9767) docs: correct spelling of 'Tiktok' to 'TikTok' (#6485) - [`99d3e59`](https://github.com/better-auth/better-auth/commit/99d3e59e5a7c9992a24c18e0b062b8fa238423b6) fix(db): correctly unwrap validator result in schema parsing (#6488) - [`6276a74`](https://github.com/better-auth/better-auth/commit/6276a740a710547937227532d8fdc522c5bd7074) docs: add middleware section for TanStack Start (#6495) ### 📊 Changes **383 files changed** (+25140 additions, -15723 deletions) <details> <summary>View changed files</summary> 📝 `.cspell/custom-words.txt` (+2 -1) 📝 `.cspell/third-party.txt` (+3 -1) 📝 `.github/workflows/adapter-tests.yml` (+3 -3) 📝 `.github/workflows/auto-cherry-pick-to-main.yml` (+1 -1) 📝 `.github/workflows/cherry-pick-to-main.yml` (+1 -1) 📝 `.github/workflows/ci.yml` (+18 -10) 📝 `.github/workflows/e2e.yml` (+7 -7) 📝 `.github/workflows/preview.yml` (+3 -3) 📝 `.github/workflows/release.yml` (+5 -4) 📝 `README.md` (+0 -1) 📝 `biome.json` (+3 -1) ➕ `context7.json` (+4 -0) 📝 `demo/expo/metro.config.js` (+0 -1) 📝 `demo/nextjs/app/(auth)/forget-password/page.tsx` (+1 -1) 📝 `demo/nextjs/app/(auth)/two-factor/otp/page.tsx` (+1 -1) 📝 `demo/nextjs/app/admin/page.tsx` (+0 -7) 📝 `demo/nextjs/app/apps/register/page.tsx` (+1 -12) 📝 `demo/nextjs/app/dashboard/organization-card.tsx` (+0 -3) 📝 `demo/nextjs/app/dashboard/user-card.tsx` (+5 -5) 📝 `demo/nextjs/app/globals.css` (+62 -4) _...and 80 more files_ </details> ### 📄 Description ## AI Generated Fix for #6753 ### Analysis The current API only supports inviting a single member via authClient.organization.inviteMember which accepts a single email string. To enable bulk invitations, we need to extend the client to accept an array of emails. This can be done by updating the inviteMember method to allow a string or string[] and by adding a new inviteMembers convenience method that forwards an array of emails to the same endpoint, reducing the number of HTTP requests. The change includes updating TypeScript types, the method implementation, and exporting the new method. ### Changes - packages/better-auth/src/client/organization.ts Generated by Fix AI Bot 🤖 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds bulk user invitations to organizations, letting admins invite multiple emails in one request to speed up onboarding and reduce API calls. - **New Features** - organization.inviteMember now accepts a single email or an array of emails. - Added organization.inviteMembers for batch invites; updated TypeScript types and exports. <sup>Written for commit 00ede9037a4bce5f48f9adc0bc01d6e34056af3c. 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-04-15 21:58:04 -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#23772