@happyvertical/smrt-users 0.39.15 → 0.39.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -240,8 +240,12 @@ the package root).
240
240
  refuses to provision a user when the IdP explicitly returns
241
241
  `email_verified: false` (opt out with `{ allowUnverifiedEmail: true }`). An
242
242
  absent claim makes no assertion and is not enforced.
243
- - **Verified-email Profile reuse is fail-closed.** Default provisioning reuses
244
- only one unowned, global `Person`. Tenant-scoped, non-Person, duplicate-email,
243
+ - **Verified-email Profile reuse is fail-closed.** The typed canonical scenarios
244
+ live in
245
+ `packages/profiles/src/testing/oidcProvisioningDecisionMatrix.ts`; both
246
+ package suites execute that matrix and public docs reference it rather than
247
+ maintaining another behavioral table. Default provisioning reuses only one
248
+ unowned, global `Person`. Tenant-scoped, non-Person, duplicate-email,
245
249
  and already-owned matches fail before User/session creation. An existing
246
250
  issuer/subject link without a User must still be the unique global Person for
247
251
  the current verified claim email; once owned, the stable issuer/subject link
package/README.md CHANGED
@@ -374,14 +374,15 @@ can pass `transactionCookieSecret` to the route helpers. On success it creates
374
374
  or reuses a SMRT `Profile`, links an `OidcIdentity`, creates or reuses a `User`,
375
375
  records `lastLoginAt`, and sets the standard SMRT session cookie.
376
376
 
377
- Verified-email provisioning is fail-closed. The default resolver reuses a
378
- Profile only when exactly one case-insensitive email match exists and that row
379
- is an unowned, global `Person`. A tenant-scoped Profile, a non-`Person` STI row,
380
- duplicate email matches, or a Profile already owned by another `User` rejects
381
- the callback before User or session creation. An existing OIDC issuer/subject
382
- link without a User must still identify the unique global `Person` for the
383
- current verified claim email. Once a User owns it, the stable issuer/subject
384
- link continues to select its canonical global `Person` and existing User.
377
+ The typed [OIDC provisioning decision matrix](../profiles/src/testing/oidcProvisioningDecisionMatrix.ts)
378
+ is the canonical behavior contract shared with Profiles. Its executable rows
379
+ declare exact reuse and new-identity outcomes, resolver invocation and
380
+ rebinding, ownership/collision failures, readiness, retries, adapter support,
381
+ public errors, and permitted Profile/OIDC identity/User/session creation. For a
382
+ new identity, the Users path is deliberately fail-closed before User or session
383
+ creation unless the selected Profile is the one safe, unowned global `Person`
384
+ allowed by that matrix. An exact issuer/subject link may instead continue to
385
+ its already-owned canonical global `Person`, but it cannot be rebound.
385
386
 
386
387
  Canonical Profile failures use `CanonicalPersonProfileError` from
387
388
  `@happyvertical/smrt-profiles`, with codes `ambiguous_email`, `email_mismatch`,