Invitations
Invitations are the preferred way to onboard new users and grant app access to existing Claxx Auth identities. You send a themed email with a secure link. A new invitee chooses their own password; someone who already has a Claxx Auth account signs in to it and accepts. Nothing sensitive travels through side channels.
Invitations live at /admin/invitations. The list shows every pending, accepted, revoked, and expired invitation in the tenant.
Why invitations over direct user creation
| Concern | Invitation | Direct create |
|---|---|---|
| Temporary password to communicate | None | Yes — must be handed off securely |
| User sets their own password | Yes | Only after first sign-in (force-reset) |
| Audit trail | invitation.created + .accepted | user.created |
| Works for external users | Yes (email works regardless of domain) | Yes |
| Grants access to an existing account | Yes, once its owner signs in | No |
For anything other than scripted migrations and machine accounts, use invitations. See the users guide for the exceptions.
Creating an invitation
From /admin/invitations:
- Click New Invitation.
- Enter the Recipient email.
- Pick the Client: the OAuth client the invitee will be onboarded against. Its theme drives the invitation email's branding and the page the link opens.
- Click Send invitation.
The form uses the defaults: the link works for 7 days, and any provider linked to the client may be used. The API (POST /api/admin/invitations) also takes ttlDays (1 to 30) and requiredProviderKeys, provider slugs such as example-sso when the invite must be claimed through a specific upstream provider.
Claxx Auth:
- Creates an
invitationsrow with a one-time accept token (a cryptographically random 256-bit token, stored only as a hash). - Resolves the theme bound to the selected client.
- Renders the themed invitation email: logo, primary color, heading from the client's theme.
- Sends it through the email service. If sending fails, the invitation row still exists and the failure is logged; revoke the invitation and send a new one.
The invitation immediately appears in the list with status pending.
Who sees the link
The email is the only way the link reaches the invitee. A tenant admin is never shown the link: the confirmation says it was emailed, and nothing more. Only a platform admin sees the link in the confirmation, with a Copy invite link button.
This is deliberate. Accounts are shared across tenants, and the link is what lets someone accept. An admin who could open the link could otherwise create an account for an address they do not control.
The invitee experience
- The invitee receives an email titled "You're invited to {client name}", branded with the client's theme, with an Accept invitation button.
- The button opens
/invite?token=...on the tenant's host. - Claxx Auth checks the token and shows one of these:
- No account uses the address. The invitee chooses a password (at least 12 and at most 128 characters, and not one found in known data breaches when that check is on; see users guide → password policies). Claxx Auth creates the account, marks the address verified, accepts the invitation and signs them in.
- An account already uses the address, and this browser is not signed in to it. The page says so and offers Sign in. After signing in, the invitee comes back to the invitation. The invitation never sets that account's password and never signs anyone in to it.
- Signed in to the account that uses the address. The page shows one Accept invitation button. Accepting changes nothing about the account's password or sessions.
- Signed in to a different account. Treated like not signed in: the invitee must sign in to the account that uses the invited address.
- The invitation has required providers. Only those providers are shown, and there is no password path.
- Expired or revoked. The page shows Invitation unavailable and asks the invitee to request a fresh invitation from their administrator.
- Already accepted. The page says so.
- After accepting, the invitee continues to the client's invitation landing page.
An invitation can be accepted once. If the link is used twice at the same moment, exactly one acceptance succeeds.
The whole experience is themed: the email, the acceptance page, the sign-in page. See theme studio for how the theme resolves.
What acceptance records
- Email: the invited address. On a new account it is the account's address.
- Email verified: a new account's address is marked verified, because the link went to that mailbox. Through a provider, the provider itself must confirm the invited address: one that gives another address, or does not confirm it, does not accept the invitation.
- Bound client: the invitation records the client it was created for, and
invitation.acceptedcarries it to the downstream app.
Provider-targeted invitations
Some invitations are intentionally restricted to one or more providers.
Use this when:
- the user's company requires a specific IdP for access
- the invited operational email is different from the provider-returned email
- you want the identity proof to happen through one corporate provider
Examples:
- require
example-ssofor people whose organization signs in through Example SSO - require Google for a Google Workspace-based client
Claxx Auth validates two things before allowing the invite to continue:
- the chosen provider must be linked to the invited client
- the chosen provider must be one of the invitation's required providers, if any were specified
Existing users versus new users
An invitation does not always mean "create a brand-new account."
There are two normal outcomes:
- Existing Claxx Auth user: the invite grants access and carries context. The person signs in to their account as usual (with their password, second factor or provider), then accepts.
- New Claxx Auth user: the invite creates the account with the password the invitee chooses.
This matters for support teams. If someone already uses Claxx Auth for another app, they should not create a second account; they sign in and accept. If they no longer know their password, they reset it from the sign-in page first.
Different invited email and provider email
An invitation claimed through a provider is accepted only when the provider confirms the invited address itself (its email_verified, compared without case). A provider that returns another address, or does not confirm the address, does not accept the invitation, and no address is recorded on anyone's account. The invitee sees "We could not finish claiming the invitation" on the invitation page.
For example, an invitation sent to jordan.lee@example.test cannot be claimed with a provider sign-in as j.lee@corp.example.test. The options are:
- claim it through a provider that uses the invited address,
- claim it on the password path, if the invitation allows it, or
- revoke it and invite the address the provider uses.
A provider sign-in is also never attached to an existing account because the address matches. An invitee who already has an account with the invited address signs in with their password, connects the provider from their profile, and then opens the invitation again.
Lifecycle and state
An invitation moves through these states:
| State | Trigger | Next states |
|---|---|---|
pending | Invitation created | accepted, revoked, expired |
accepted | A new account was created from it, or the signed-in account owner accepted | — (terminal) |
revoked | Admin revoked before acceptance | — (terminal) |
expired | expiresAt passed without acceptance | — (terminal) |
If creating the new account fails partway, the invitation goes back to pending and the link can be used again.
Expired invitations are not automatically deleted. They stay in the database to preserve the audit trail. Filter the list to hide them if the surface gets noisy.
Tracking
The list view shows, for each invitation:
- Email: who the invitation is for.
- Client: the client's name and slug.
- Status: pending / accepted / revoked / expired, with a status chip.
- Expires: when it stops working.
- Accepted: when it was accepted, if it was.
Filter by status. The API (GET /api/admin/invitations) also filters by search (email) and clientId.
Revoking an invitation
Click Revoke on any pending invitation to invalidate its token immediately. The invitee sees Invitation unavailable if they later open the link.
- Accepted invitations can't be revoked; they're already consumed. Use the users list to deactivate or delete the resulting user record if you need to roll back.
- Expired invitations don't need revoking; they're already unusable.
- Revocation publishes
invitation.revoked.
Re-sending
There is no resend. If the invitee did not receive the email, revoke the invitation and send a new one. The new invitation has a new link; the old one stops working when it is revoked.
The invitation URL format
Accept URLs look like:
https://{tenant host}/invite?token={acceptToken}
acceptToken is the one-time secret. Only its hash is stored, so the link cannot be recovered from the database after the email is sent.
Only a platform admin is shown the URL, in the confirmation after sending. Treat it as a credential: never paste it in a public channel.
Sending many invitations
There is no bulk import. POST /api/admin/invitations accepts one invitation per call: script against it with an admin service token or session if you need to invite many people.
Events
Every invitation lifecycle event publishes to the webhook stream:
invitation.created: payload includes invitee email, client, expires-at and who invited.invitation.accepted: payload includes the accepting user's ID, the invited email, the client and the invitation's context.invitation.revoked: payload includes the invitation ID.
See the webhook events reference for payload shapes. Downstream apps can subscribe to invitation.accepted to trigger tenant-side onboarding (create a workspace, seed default content, etc.).
Email rendering
Invitation emails render against the theme bound to the client the invitation is for:
- Logo: the theme's logo (or the default Claxx Auth shield if none is set).
- Heading: "You're invited to {client name}".
- Body: a short introductory paragraph.
- Button: styled with the theme's primary color, labeled Accept invitation.
- Footer: the theme's footer text, with a fallback to "Powered by Claxx Auth".
Subject line, body copy, and button label are not currently exposed as per-tenant overrides. File an issue if you need tenant-customizable email copy.
Common failure modes
| Symptom | Likely cause |
|---|---|
| Invitee reports no email received | The email was not delivered. Check the email service's logs, then revoke and send a new invitation. |
| Invitee sees "An account already uses this address" | They already have a Claxx Auth account. They sign in to it (resetting the password first if needed), then accept. |
| Invitee is signed in but still asked to sign in | They are signed in to a different account, or their session is on another tenant's host. They sign in to the invited account here. |
| Invitee clicks link, sees "already accepted" | Someone already accepted. Check for a recent invitation.accepted event. |
| Invitee clicks link, sees "Invitation unavailable" | Link is past expiresAt, or you revoked it. Send a new invitation. |
Next
- Users: manage the user records that invitations create.
- Clients: the OAuth client drives email branding and post-accept routing.
- Theme studio overview: design the invitation email and the acceptance page.