Suggestion About "Setup Invitation Email" Docs #2461

Open
opened 2026-03-13 09:56:15 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @JeffreyLind3 on GitHub (Dec 5, 2025).

In https://www.better-auth.com/docs/plugins/organization we have the following example:

import { betterAuth } from "better-auth";
import { organization } from "better-auth/plugins";
import { sendOrganizationInvitation } from "./email";
export const auth = betterAuth({
  plugins: [
    organization({
      async sendInvitationEmail(data) {
        const inviteLink = `https://example.com/accept-invitation/${data.id}`;
        sendOrganizationInvitation({
          email: data.email,
          invitedByUsername: data.inviter.user.name,
          invitedByEmail: data.inviter.user.email,
          teamName: data.organization.name,
          inviteLink,
        });
      },
    }),
  ],
});

Semantically, wouldn't it be more canonical to construct inviteLink via a search parameter instead of a dynamic route, similar to how the reset password docs in https://www.better-auth.com/docs/authentication/email-password are?

Originally created by @JeffreyLind3 on GitHub (Dec 5, 2025). In `https://www.better-auth.com/docs/plugins/organization` we have the following example: ```typescript import { betterAuth } from "better-auth"; import { organization } from "better-auth/plugins"; import { sendOrganizationInvitation } from "./email"; export const auth = betterAuth({ plugins: [ organization({ async sendInvitationEmail(data) { const inviteLink = `https://example.com/accept-invitation/${data.id}`; sendOrganizationInvitation({ email: data.email, invitedByUsername: data.inviter.user.name, invitedByEmail: data.inviter.user.email, teamName: data.organization.name, inviteLink, }); }, }), ], }); ``` Semantically, wouldn't it be more canonical to construct inviteLink via a search parameter instead of a dynamic route, similar to how the reset password docs in ```https://www.better-auth.com/docs/authentication/email-password``` are?
GiteaMirror added the staledocumentation labels 2026-03-13 09:56:15 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Dec 5, 2025):

Thanks for your suggestion! The current example uses a dynamic route, but you’re right that using a query parameter—like the reset password flow—could be more canonical for consistency in our docs. We appreciate the feedback and will review this with the team to see if aligning the invitation link construction with the reset password pattern might offer clearer semantics without impacting routing functionality. Could you share if you encountered any specific issues with the dynamic route approach, or is this mainly a preference for consistency? tag @better-auth-agent if you would like an answer from the Agent

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Dec 5, 2025): Thanks for your suggestion! The current example uses a dynamic route, but you’re right that using a query parameter—like the reset password flow—could be more canonical for consistency in our docs. We appreciate the feedback and will review this with the team to see if aligning the invitation link construction with the reset password pattern might offer clearer semantics without impacting routing functionality. Could you share if you encountered any specific issues with the dynamic route approach, or is this mainly a preference for consistency? tag @better-auth-agent if you would like an answer from the Agent _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) • [Discord](https://discord.gg/fG2XXEuQX3) • [GitHub](https://github.com/Skyvern-AI/Skyvern) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/fG2XXEuQX3) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/Skyvern-AI/Skyvern)
Author
Owner

@dosubot[bot] commented on GitHub (Mar 6, 2026):

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

Issue Summary:

  • You suggested updating the "Setup Invitation Email" docs to use a query parameter for the inviteLink instead of a dynamic route.
  • This change aims to align the invitation email docs with the reset password docs for better semantic consistency.
  • The maintainer acknowledged the suggestion and sees potential clarity improvements.
  • They planned to review the proposal with the team but have not provided further updates.
  • No resolution or decision has been made yet.

Next Steps:

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

Thanks for your understanding and contribution!

@dosubot[bot] commented on GitHub (Mar 6, 2026): Hi, @JeffreyLind3. 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 suggested updating the "Setup Invitation Email" docs to use a query parameter for the inviteLink instead of a dynamic route. - This change aims to align the invitation email docs with the reset password docs for better semantic consistency. - The maintainer acknowledged the suggestion and sees potential clarity improvements. - They planned to review the proposal with the team but have not provided further updates. - No resolution or decision has been made yet. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of better-auth by commenting here. - If I don’t hear back within 7 days, I will automatically close this issue. Thanks for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2461