Skip to content
TesseraDocs
MenuInvites

Invites

An invite is a one-time link that lets a person join a workspace or a realm, optionally with roles already attached.

View as Markdown

On this page

An invite is a one-time link that lets a person join a workspace or a realm, optionally with roles already attached.

Tessera is invite-only during early access, and new realms default to invite-only sign-up, so invites are how people arrive.

Three kinds

Kind Who it is for Made by
Workspace invite A new workspace owner, or a co-admin in your workspace The Tessera team, or a workspace owner
Realm invite A person who will sign in to your app A realm admin
Open invite link Someone you can reach but whose email you do not know A realm admin or an agent

Workspace invites

The Tessera team invites a new workspace by email. Accepting it creates the workspace with the invitee as owner. A workspace owner can invite an admin into the workspace the same way. Invites last 7 days, and a second invite for an address that already has a pending one is refused with a 409, as is one for a person who is already a member.

An invite from a workspace owner is delivered by email only. The owner is never shown the link, and the API answer and the invite list do not contain it: only the invitee's mailbox does. This keeps an owner from accepting an invite in someone else's name. These invites are also limited: 20 an hour for each workspace, and each one counts against the workspace's monthly email cap (the answer is 429 when it is used up). An invite that fails, such as a duplicate, gives its slot back. The Tessera team, when it invites a new workspace, can still choose to send the link itself.

Realm invites

In the console, open a realm and choose Members. Enter an email, pick a role, and send.

Console role What it means
Admin Can manage the realm: apps, sign-in methods and teammates.
Member Can sign in to your apps. Cannot open the console.

What the person sees:

  1. An email with an Accept invitation button. If the realm cannot send email, the console says so and gives you the link to send yourself.
  2. A page that asks them to confirm. The link is used up only when they press the button, so a mail scanner that opens the link cannot spend it.
  3. For a new address, Tessera creates the account with the email already verified, because holding the link proves the mailbox, and signs the person in. A welcome page offers a passkey, then continues to your app.
  4. For an address that already has an account, Tessera applies the invite's roles and groups and starts no session. The person goes on to your app and signs in the usual way.

Statuses are pending, expired, accepted and revoked. Pending invites can be copied, extended, regenerated (a new link, the old one stops working), resent or revoked. The default lifetime is 7 days and can be set from 5 minutes to 30 days.

With the CLI

tessera invites create --email ana@example.com --client shop-web --role shop:member
tessera invites list
tessera invites revoke ana@example.com

The link is a credential. Add --print-link or --link-file <path> to get it, and --no-email to skip the email. Inviting an address that already has an account also needs permission to act on users (tessera:users:write). Without it the request is refused with a 409 and nothing is made.

Land in your app

--client names the app the person lands in after accepting, and --landing-url a page in it. The address must be one of the app's registered redirect URLs or on one of its origins, and it is checked again when the link is used. A realm can also have a default landing for all its invites. A new person sees the welcome page first.

Roles in an invite

An invite can carry roles and groups. They are applied when the person accepts, in the same step that creates the account.

{
  "email": "ana@example.com",
  "target_client_id": "shop-web",
  "roles": [{"app": "shop", "role": "member"}],
  "groups": ["beta-testers"]
}
  • A role is {"app": "<app>", "role": "<role>"}. A realm-wide role leaves out app.
  • You need the access-write permission as well as the invite permission to grant roles or groups.
  • Every role and group is checked when the invite is made, and again when it is used. One that was deleted in between is skipped.
  • Realm admin rights go with a separate flag, grants_realm_admin, which needs full realm-admin rights. If the inviter loses their rights, an invite that grants something stops working.

See roles and permissions for how roles reach the token.

Sometimes you can send a link but do not know the person's email: you want to text a link to a technician. An open invite link has no address. Whoever opens it types an email address, gets a 6-digit code at that address, and the first correct code claims the invite.

POST /admin/v1/realms/acme/invites
Authorization: Bearer <admin token>
Content-Type: application/json

{
  "claimable": true,
  "roles": [{"app": "shop", "role": "member"}],
  "target_client_id": "shop-web",
  "allowed_email_domain": "example.com"
}

The response has "email": null, "claimable": true and the invite_url to send. With the CLI:

tessera invites create --claimable --allowed-domain example.com --role shop:member --print-link

What to know:

  • It works in invite-only realms. The invite is the permission.
  • claimable takes no email, does not send email, and cannot grant realm admin. A request with neither an email nor claimable is a 400.
  • allowed_email_domain limits claims to that exact domain, with no subdomains.
  • --invited-by (or invited_by_label, up to 80 characters) sets the sender name shown on the page.
  • The address and code steps are shown with an error summary when something is wrong: an address that is not valid, an address outside allowed_email_domain (the message names the domain), or a code that is wrong, malformed, expired or used up. The messages depend only on what was typed, so they do not reveal whether an address has an account.
  • The code goes only to the address typed. Nothing is created before the code is right. If the address already has an account, it gets the invite's roles and groups and signs in as usual.
  • It is single use. The first verified claim wins, and the invite then shows the claiming address.
  • Limits: 5 guesses per code, and 10 wrong codes per invite in total. Then the invite refuses claims until you regenerate it. Sending codes follows the realm's email limits.
  • The invite and its claim are recorded in the audit log.

Note. An open link is a bearer link. Anyone who holds it can claim it once, with any address they can read. Send it only to the person you mean, set the domain when you know their organization, and revoke or regenerate it if it leaks.

The claim page needs the same browser that asked for the code. Someone who reads the email on another device types the code in the first browser.

Planned. An emailed link as a second way to prove the mailbox, for a phone that reads mail in another app, is not built yet. Only the code works.

Agreements at sign-up

Realms can also ask people to accept terms. See agreements.