Accounts, identities, and teams
An identity has a generated, stable ID, a
human or agent kind, profile
information, and enabled/disabled status. Its ID remains the same after
account linking, so its resources and history stay
with it. Linking does not merge identities or grant administration.
A useful application layout is one organization per environment and an initial
team and identity for each user. Add team memberships when your application
supports collaboration. An identity must currently belong to the team it acts in;
knowing a team or resource ID does not grant access.
Joining Tilde directly
Tilde uses Clerk for login accounts, while organizations and teams are native Tilde records. Signing up does not create an organization in Clerk or provision a Tilde workspace through a webhook. If you follow an organization invitation from an email, sign in or sign up with the invited account. Tilde accepts the invitation, creates or reuses your identity in that organization, selects its team, and opens the home dashboard. Existing memberships in other organizations do not change that destination. For a first-time account without an invitation or organization membership, Tilde asks you to name your first organization and team. Submitting this setup creates the organization, team, identity, and administrative membership before opening home. Retries during initial setup reuse the same workspace instead of creating duplicates. Clerk webhooks reconcile account lifecycle only. If you completed first-organization setup previously but no longer have any organization memberships, Tilde shows Restore organization access. Recover access through an organization invitation or managed account linking, or sign out to use another account. This recovery screen does not show the first-organization form. Tilde does not automatically recreate a deleted first organization or restore revoked access when the original setup request is retried. The hosted account-linking flow can connect an existing application identity without creating a separate first organization.Create an application client
Create an organization proxy token with identity and team provisioning capabilities. Store it only on your server.lib/tilde.ts
forTeam returns a separate client. Keep the shared application client immutable
so concurrent requests cannot exchange identities or teams. A bound runtime
client cannot perform identity administration.
Provision on the first authenticated request
Verify the application’s session on the server, including its expected issuer. Use the verified issuer and subject as the mapping key. Never use an identity ID, team ID, or email submitted by the browser as proof of identity.(environment, issuer, subject). Serialize concurrent provisioning for that key
and return the stored mapping on repeat login. The initial-team operation is
idempotent; retry it after a partial failure. Do not retry arbitrary failures by
creating another identity.
Identifiers are optional and unique by (org, namespace, value). You can add
identifiers later with tilde.identities.update. An existing identifier cannot be
claimed by another identity. Identifiers help your trusted server resolve a
principal; they are not verified contact ownership or permission to link accounts.
Matching email addresses alone never authorize a link.
Manage memberships and identifiers
An unbound client withidentities:manage can manage an identity’s memberships in
existing teams within the same organization:
Manage lifecycle
{ items, next_page_token }. Pass cursors
unchanged; page sizes are clamped to 1–100.
Verify your identity provider’s webhook signatures before changing a mapping.
Record disabled/deleted state durably, reject stale events, and retry remote
disabling after transient failures. Signing in again must not silently restore a
deleted user’s access. In HeyAsh, Clerk profile changes and unlock events do not
re-enable a Tilde identity disabled by an administrator; recovery requires an
explicit Tilde administrator action. Disabling an identity stops its runtime access while
preserving resources and audit history.
Fresh resets and stale events
Before resetting Tilde or your application database, pause writers and record a cutover instant outside the databases being cleared. The Tilde and HeyAsh Clerk integrations supportCLERK_WEBHOOK_EVENTS_NOT_BEFORE as an ISO-8601 timestamp with
a timezone. Configure it on each deployment before bootstrap or webhook delivery
resumes. Signed events older than that original-event timestamp are ignored;
delivery retry timestamps must not bypass the cutoff. Keep lifecycle tombstones
and signature verification in addition to this reset boundary.