Skip to content

oauth_provider_unlinked

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

oauth_provider_unlinked

FunctionSource
encodeOauthProviderUnlinkedAuditReasonsrc/auth/stytch-invite.ts:253
FieldTypeRequiredNotes
provider"google" | "github" | "microsoft"yes
member_idstringyes
remaining_methodsnumberyesCount 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.