<AcceptInvite/> component
<AcceptInvite /> is the embedded invite-acceptance surface. It reads the token, resolves the invitation, and either finishes the membership flow or hands off to sign-in or sign-up when the invite still needs an authenticated user.
Usage
The following example shows a basic usage of <AcceptInvite />.
import { AcceptInvite } from '@wacht/tanstack-router';export default function AcceptInviteUsage() { return ( <> <AcceptInvite token={token} /> </> );}Invite source
The token can come from the
token prop, invite_token in the URL, or the older token query parameter. The component checks those sources once when it starts.If the token is missing, the component stops on the invalid-invite state instead of trying to guess the next step.
Result states
A valid invitation can resolve to a completed membership, an already-member state, a sign-in or sign-up requirement, an expired invite, or a generic error state.
When the invite still needs authentication, the component keeps the invite context and sends the user to the right auth entry point with the token still attached.
Fallbacks
If the invite is already consumed or no longer valid, the page stays on the invite error state and lets the user retry or continue through the auth path that matches the invite.