member_jit_joined
This page is auto-generated from
src/auth/stytch-invite.ts. Do not edit by hand — seedocs/dev/docs-auto-sync.md.
Event string
Section titled “Event string”member_jit_joined
Emitting helpers
Section titled “Emitting helpers”| Function | Source |
|---|---|
encodeMemberJitJoinedAuditReason | src/auth/stytch-invite.ts:221 |
Context fields
Section titled “Context fields”| Field | Type | Required | Notes |
|---|---|---|---|
member_row_id | string | yes | — |
stytch_member_id | string | yes | — |
email_domain | string | yes | — |
role | "owner" | "admin" | "member" | "viewer" | yes | — |
claim_id | string | yes | — |
Documentation
Section titled “Documentation”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.