Incorrect Documentation and Code Around Member Invitation Role Property #2256

Closed
opened 2026-03-13 09:38:54 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @JeffreyLind3 on GitHub (Nov 4, 2025).

In various places around the codebase and documentation (on Github, do a verbatim search for "guest" and you will see the various files where the term "guest" pops up, I found 4 relevant files) where it is incorrectly claimed that in authClient.organization.inviteMember, role can be admin, member, or guest.

However, the accepted possible roles for this method property is "admin" | "member" | "owner" | ("admin" | "member" | "owner")[]

Originally created by @JeffreyLind3 on GitHub (Nov 4, 2025). In various places around the codebase and documentation (on Github, do a verbatim search for "guest" and you will see the various files where the term "guest" pops up, I found 4 relevant files) where it is incorrectly claimed that in `authClient.organization.inviteMember`, role can be `admin`, `member`, or `guest`. However, the accepted possible roles for this method property is `"admin" | "member" | "owner" | ("admin" | "member" | "owner")[]`
GiteaMirror added the documentation label 2026-03-13 09:38:54 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 4, 2025):

You’re right—there are several places in the codebase and documentation where 'guest' is incorrectly listed as a valid role for authClient.organization.inviteMember. The actual accepted roles are 'admin', 'member', and 'owner', or an array of these values. The references to 'guest' appear in type definitions, documentation files (like invite-member.mdx and example.mdx), and inline comments, but the implementation and type definitions only accept the correct roles.

To fix this, update any documentation, code comments, and examples that mention 'guest' as a valid role so they only list 'admin', 'member', and 'owner' (or arrays of these). This will bring the docs and comments in line with the actual API and prevent confusion for developers. For more details on accepted roles and dynamic access control, see this discussion.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 4, 2025): <!-- Answer --> You’re right—there are several places in the codebase and documentation where 'guest' is incorrectly listed as a valid role for `authClient.organization.inviteMember`. The actual accepted roles are `'admin'`, `'member'`, and `'owner'`, or an array of these values. The references to 'guest' appear in type definitions, documentation files (like `invite-member.mdx` and `example.mdx`), and inline comments, but the implementation and type definitions only accept the correct roles. To fix this, update any documentation, code comments, and examples that mention 'guest' as a valid role so they only list `'admin'`, `'member'`, and `'owner'` (or arrays of these). This will bring the docs and comments in line with the actual API and prevent confusion for developers. For more details on accepted roles and dynamic access control, see [this discussion](https://github.com/better-auth/better-auth/issues/4463). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/c3634d5a-0881-4173-b305-039521cbf926?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c3634d5a-0881-4173-b305-039521cbf926?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c3634d5a-0881-4173-b305-039521cbf926?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c3634d5a-0881-4173-b305-039521cbf926?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c3634d5a-0881-4173-b305-039521cbf926?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c3634d5a-0881-4173-b305-039521cbf926?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c3634d5a-0881-4173-b305-039521cbf926?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/5757)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2256