Skip to content
rw3iss Auth

InvitationsList

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

The authenticated invitee’s pending invitations. Shows one row per pending invitation with “Accept” / “Decline” affordances.

On accept

  • The server creates the org_member row + assigns roles.
    • This component optionally calls switchOrg(orgId) so the active token re-scopes to the new org immediately. Disable via autoSwitch={false} if your app prefers to keep the user in their current org and surface a “switch to NewOrg” toast instead.

Distinguished from <MembersList> (which is org-side, for admins) and <InvitationsAdminList> (also org-side; below).

Usage

import { InvitationsList } from '@rw3iss/auth-client/preact/forms';
<InvitationsList />

Props

NameTypeDescription
clientAuthClient
autoSwitchbooleanWhether to switchOrg on accept. Default true.
onAccepted(invitation: InvitationRecord) => void
onDeclined(invitation: InvitationRecord) => void
classNamestring