Skip to content

member_jit_joined

This page is auto-generated from src/auth/stytch-invite.ts. Do not edit by hand — see docs/dev/docs-auto-sync.md.

member_jit_joined

FunctionSource
encodeMemberJitJoinedAuditReasonsrc/auth/stytch-invite.ts:221
FieldTypeRequiredNotes
member_row_idstringyes
stytch_member_idstringyes
email_domainstringyes
role"owner" | "admin" | "member" | "viewer"yes
claim_idstringyes

Emitted by the sign-in callback when a user auto-joined a tenant via a matched verified-domain claim. member_row_id is the newly-inserted tenant_members.id; email_domain is the matched domain (NOT the full address). role is the role granted by the claim’s default_role.

tenant_id is intentionally NOT included in the envelope — the audit_log row already carries it as a column, and decision_reason is varchar(256) so every duplicated field eats into the budget. The pivot from envelope back to the canonical row is via member_row_id.

This envelope is stored in audit_log.decision_reason (varchar(256)) as a JSON object with the shape { event, ...ctx }. The audit_log row carries tenant_id, actor_user_id, and timestamp as columns alongside — those are not duplicated in the envelope.