[GH-ISSUE #3672] Allow users to get invited to an organization without sending emails #18313

Closed
opened 2026-04-15 16:44:18 -05:00 by GiteaMirror · 13 comments
Owner

Originally created by @michidk on GitHub (Jul 28, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3672

Is this suited for github?

  • Yes, this is suited for github

Currently the only way to create an invitation in the backend using better-auth is using this API: https://www.better-auth.com/docs/plugins/organization#send-invitation.

However, this sends out an email to the recipient. Some systems might not use emails for invites, and instead would rather show the user a notification or a list of invites he can accept if he already has an account on the platform.

Describe the solution you'd like

A property to disable sending emails.
Example:

const data = await auth.api.createInvitation({
    body: {
        email: "example@gmail.com", // required
        sendEmail: false,
        role: "member", // required
        organizationId: "org-id",
        resend: true,
        teamId: "team-id",
    },
});

Describe alternatives you've considered

Manually creating database entries

Additional context

No response

Originally created by @michidk on GitHub (Jul 28, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3672 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Currently the only way to create an invitation in the backend using better-auth is using this API: https://www.better-auth.com/docs/plugins/organization#send-invitation. However, this sends out an email to the recipient. Some systems might not use emails for invites, and instead would rather show the user a notification or a list of invites he can accept if he already has an account on the platform. ### Describe the solution you'd like A property to disable sending emails. Example: ``` const data = await auth.api.createInvitation({ body: { email: "example@gmail.com", // required sendEmail: false, role: "member", // required organizationId: "org-id", resend: true, teamId: "team-id", }, }); ``` ### Describe alternatives you've considered Manually creating database entries ### Additional context _No response_
GiteaMirror added the lockedenhancement labels 2026-04-15 16:44:18 -05:00
Author
Owner

@heystevegray commented on GitHub (Jul 31, 2025):

I implemented an invite flow like this:

  1. Added a "copy to clipboard" button to share an invite link to a page like /organizations/accept/${orgId}. New users need to log in first and then get redirected here.
  2. The /organizations/accept/${orgId} page displays public organization info (name, image) and allows logged-in users to click a button to join the organization.
  3. When accepting the invite you can add them like this: https://better-auth.vercel.app/docs/plugins/organization#add-member
    const data = await auth.api.addMember({
       body: {
          userId: "user-id",
          role: ["admin", "sale"], // required
          organizationId: "org-id",
          teamId: "team-id",
       },
    });
    
<!-- gh-comment-id:3138331647 --> @heystevegray commented on GitHub (Jul 31, 2025): I implemented an invite flow like this: 1. Added a "copy to clipboard" button to share an invite link to a page like `/organizations/accept/${orgId}`. New users need to log in first and then get redirected here. 2. The `/organizations/accept/${orgId}` page displays public organization info (name, image) and allows logged-in users to click a button to join the organization. 3. When accepting the invite you can add them like this: https://better-auth.vercel.app/docs/plugins/organization#add-member ```ts const data = await auth.api.addMember({ body: { userId: "user-id", role: ["admin", "sale"], // required organizationId: "org-id", teamId: "team-id", }, }); ```
Author
Owner

@michidk commented on GitHub (Aug 11, 2025):

but, I either have to create my own invite table or the user will still get an email, because the information wether a user was invited or not needs to be stored (or the info from the link validated).

Having this in the same API by just disabling the email sending for one call would make this much easier.

cc @ping-maxwell not solved

<!-- gh-comment-id:3176061500 --> @michidk commented on GitHub (Aug 11, 2025): but, I either have to create my own invite table or the user will still get an email, because the information wether a user was invited or not needs to be stored (or the info from the link validated). Having this in the same API by just disabling the email sending for one call would make this much easier. cc @ping-maxwell not solved
Author
Owner

@shahaayush1999 commented on GitHub (Aug 12, 2025):

Facing the same issue, would prefer (at least on the server side) to have the ability to create an invitation without sending an email

<!-- gh-comment-id:3180166181 --> @shahaayush1999 commented on GitHub (Aug 12, 2025): Facing the same issue, would prefer (at least on the server side) to have the ability to create an invitation without sending an email
Author
Owner

@aniketicloud commented on GitHub (Oct 16, 2025):

I am facing the same issue to have the ability to create an invitation without sending an email

<!-- gh-comment-id:3409256378 --> @aniketicloud commented on GitHub (Oct 16, 2025): I am facing the same issue to have the ability to create an invitation without sending an email
Author
Owner

@dosubot[bot] commented on GitHub (Jan 15, 2026):

Hi, @michidk. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested a feature to create organization invitations without sending emails, suggesting a "sendEmail" option in the API.
  • Currently, invitations either send emails automatically or require manual database edits, complicating invite management.
  • A contributor shared a workaround involving invite links and manual member addition, but you noted this still requires custom invite storage or results in emails being sent.
  • Other users have expressed facing the same issue and support this feature request.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of better-auth by commenting here to keep the discussion open.
  • If I don’t hear back within 7 days, I will automatically close this issue.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3755634342 --> @dosubot[bot] commented on GitHub (Jan 15, 2026): Hi, @michidk. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested a feature to create organization invitations without sending emails, suggesting a "sendEmail" option in the API. - Currently, invitations either send emails automatically or require manual database edits, complicating invite management. - A contributor shared a workaround involving invite links and manual member addition, but you noted this still requires custom invite storage or results in emails being sent. - Other users have expressed facing the same issue and support this feature request. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of better-auth by commenting here to keep the discussion open. - If I don’t hear back within 7 days, I will automatically close this issue. Thank you for your understanding and contribution!
Author
Owner

@michidk commented on GitHub (Jan 16, 2026):

@dosubot it's still relevant

<!-- gh-comment-id:3758865581 --> @michidk commented on GitHub (Jan 16, 2026): @dosubot it's still relevant
Author
Owner

@maxvaljan commented on GitHub (Feb 3, 2026):

yes would be great to add this

<!-- gh-comment-id:3843917331 --> @maxvaljan commented on GitHub (Feb 3, 2026): yes would be great to add this
Author
Owner

@DinoVincent commented on GitHub (Feb 8, 2026):

still relevant

<!-- gh-comment-id:3867411638 --> @DinoVincent commented on GitHub (Feb 8, 2026): still relevant
Author
Owner

@ping-maxwell commented on GitHub (Feb 10, 2026):

This will be implemented as part of the org-rewrite. No ETAs of when it will be merged at the moment, but it will be part of a major release.

<!-- gh-comment-id:3875738511 --> @ping-maxwell commented on GitHub (Feb 10, 2026): This will be implemented as part of the org-rewrite. No ETAs of when it will be merged at the moment, but it will be part of a major release.
Author
Owner

@maxvaljan commented on GitHub (Feb 10, 2026):

Hi Ping, could you let us know whether this will be included in the upcoming 1.5 release, or likely within the next 4 weeks?
That would help us plan our engineering to wait or build a workaround in the meantime. Thanks!

<!-- gh-comment-id:3875956124 --> @maxvaljan commented on GitHub (Feb 10, 2026): Hi Ping, could you let us know whether this will be included in the upcoming 1.5 release, or likely within the next 4 weeks? That would help us plan our engineering to wait or build a workaround in the meantime. Thanks!
Author
Owner

@ping-maxwell commented on GitHub (Feb 11, 2026):

Hi Ping, could you let us know whether this will be included in the upcoming 1.5 release, or likely within the next 4 weeks? That would help us plan our engineering to wait or build a workaround in the meantime. Thanks!

Hey, I'm not sure at this time, sorry. If I had to guess, it would probably be in 1.5. cc @himself65

<!-- gh-comment-id:3882975994 --> @ping-maxwell commented on GitHub (Feb 11, 2026): > Hi Ping, could you let us know whether this will be included in the upcoming 1.5 release, or likely within the next 4 weeks? That would help us plan our engineering to wait or build a workaround in the meantime. Thanks! Hey, I'm not sure at this time, sorry. If I had to guess, it would probably be in 1.5. cc @himself65
Author
Owner

@ping-maxwell commented on GitHub (Feb 11, 2026):

Hello all, we're moving all feature requests or enhancement issues over to Github Discussions.

I've went ahead and created the discussion here:
https://github.com/better-auth/better-auth/discussions/7910

<!-- gh-comment-id:3882984902 --> @ping-maxwell commented on GitHub (Feb 11, 2026): Hello all, we're moving all feature requests or enhancement issues over to Github Discussions. I've went ahead and created the discussion here: https://github.com/better-auth/better-auth/discussions/7910
Author
Owner

@github-actions[bot] commented on GitHub (Apr 1, 2026):

This issue has been locked as it was closed more than 7 days ago. If you're experiencing a similar problem or you have additional context, please open a new issue and reference this one.

<!-- gh-comment-id:4166559438 --> @github-actions[bot] commented on GitHub (Apr 1, 2026): This issue has been locked as it was closed more than 7 days ago. If you're experiencing a similar problem or you have additional context, please open a new issue and reference this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#18313