oauth_provider_unlinked
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”oauth_provider_unlinked
Emitting helpers
Section titled “Emitting helpers”| Function | Source |
|---|---|
encodeOauthProviderUnlinkedAuditReason | src/auth/stytch-invite.ts:253 |
Context fields
Section titled “Context fields”| Field | Type | Required | Notes |
|---|---|---|---|
provider | "google" | "github" | "microsoft" | yes | — |
member_id | string | yes | — |
remaining_methods | number | yes | Count of OTHER auth methods (other linked OAuth providers + 1 for the always-present Stytch-managed email magic-link). Lets an auditor verify the “can’t unlink your only method” boundary held at the time of the row write. |
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.