Skip to content
Discussion options

You must be logged in to vote

Hi @kxngHunter! I'm Dosu and I’m helping the better-auth team.

The "member not found" error happens because the better-auth invitation API always checks that the inviter is a member of the target organization—there's no built-in way to bypass this, even for Super Admins, and no config flag to relax the requirement. Hooks like beforeCreateInvitation can't override this check either; it's enforced before any invitation is created or sent [source].

If you want to avoid direct DB writes, the most common workaround is to use a service account or system user that is a member of every org (or is added/removed as needed) and use their session to send invitations [source]. Some teams automate thi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kxngHunter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant