Derive the opaque per-space owner token for an authenticated IdP subject.
spaceSecret is the space's owner-derivation secret (≥32 bytes, operator-held, never on the
wire); externalSubject is the IdP-authenticated stable subject (e.g. Better Auth sub) —
ALREADY VERIFIED by the caller (this function derives, it does not authenticate). Truncation
to 128 bits keeps the token subject-sized while leaving collision odds negligible for any
realistic owner population (birthday bound 2^64). Fails loud on weak/empty inputs.
Derive the opaque per-space owner token for an authenticated IdP subject.
spaceSecretis the space's owner-derivation secret (≥32 bytes, operator-held, never on the wire);externalSubjectis the IdP-authenticated stable subject (e.g. Better Authsub) — ALREADY VERIFIED by the caller (this function derives, it does not authenticate). Truncation to 128 bits keeps the token subject-sized while leaving collision odds negligible for any realistic owner population (birthday bound 2^64). Fails loud on weak/empty inputs.