# Invite Secure, reusable, single-use invitation lifecycles for Convex applications. This is an upstream package. It has not been adapted or qualified for Bijection. - Package: convex-invite - Source: https://github.com/dciccale/convex-invite - npm: https://www.npmjs.com/package/convex-invite - Directory: https://bijection.com/components/convex-invite Read the upstream README for setup, license, and compatibility before using it. ## Upstream package documentation Recorded 2026-10-23. This describes convex-invite; check the Bijection adaptation separately. convex-invite provides a secure invitation state machine for Convex applications. It generates 256-bit bearer tokens, stores only SHA-256 digests, and enforces single-use lifecycle transitions, audience binding, expiry, revocation, resend replacement, and idempotent acceptance. Host applications keep control of authentication, authorization, delivery, and domain grants. ### Use cases - Add invite-only onboarding with single-use, cryptographically secure tokens - Invite members to teams, workspaces, projects, or other host-owned resources - Bind acceptance to an authenticated user with a verified email or other audience reference - Rotate invitation links safely through atomic resend replacement - Integrate an existing email provider, including @convex-dev/resend, while keeping delivery separate from authorization ### How it works Install the package, mount it in convex/convex.config.ts, and construct an Invitations client with the generated component mount. Lifecycle write methods require a Convex mutation context. This lets invitation acceptance and the host application's membership or domain grant commit in one transaction. The component returns a raw token only from issue and resend. It stores a versioned SHA-256 digest instead of the token. The host sends the raw token through its chosen delivery provider and must not log or persist it. The provider-neutral withDelivery helper can wrap an existing provider client and records safe queued or failed delivery metadata. When a user accepts an invitation, the host verifies authentication and audience ownership. In one mutation, it calls accept, writes the host grant, and stores an idempotent acceptance result. The component also supports decline, revocation, effective expiry, bounded pruning, management queries, and atomic resend replacement. ### Upstream README # convex-invite Secure, reusable invitation lifecycles for Convex applications. This repository is a Bun workspace managed with Turborepo and Biome. ## Workspace - [`packages/convex-invite`](./packages/convex-invite) — publishable Convex component and typed host client. - [`apps/example`](./apps/example) — secure host integration with delivery and atomic membership creation. - [`apps/web`](./apps/web) — product site and documentation. - [`docs/delivery.md`](./docs/delivery.md) — delivery ownership, the example webhook contract, and an optional `@convex-dev/resend` integration. ## Development ```sh bun install bun run dev:web bun run check bun run verify:package ``` The component owns hash-only invitation tokens and the invitation state machine. Host applications retain authentication, authorization, audience verification, delivery, and domain grants.