Skip to content
rw3iss Auth

InviteMemberForm

form @rw3iss/auth-client/preact/forms/InviteMemberForm framework-adapters/preact/components/forms/InviteMemberForm.tsx ↗

Invite-by-email form for the current (or specified) org. POSTs /orgs/{orgId}/invitations — the server creates the invitation row AND sends the invite email synchronously. On success the created InvitationRecord is handed to onCreated so a parent page can refresh its pending-invitations list.

Requires org:members:invite. The server’s 403 surfaces as an inline error.

Usage

import { InviteMemberForm } from '@rw3iss/auth-client/preact/forms';
<InviteMemberForm
onError={(err) => console.error(err)}
/>

Props

NameTypeDescription
clientAuthClient
orgIdstringDefaults to the active org id from the auth snapshot.
defaultRoleIdsstring[]Pre-select role ids to assign on acceptance.
onCreated(invitation: InvitationRecord) => void
onError(err: Error) => void
classNamestring