Skip to content

Commit 9524666

Browse files
fix(plugin-auth): the self-registration grant settles on the registrant's first membership (ADR-0131 D3, C8 8b-0f) (#24453)
Part of #24343 Part of #15212 Clause-②: no C8 stage 8b-0f. It carries ruling Q1 A on #24377 (record 6257510973, item 1): the self-registration grant settles on the first membership. The card stays open because Q2 (stage 8b-0d) still lands on it. ## What changed The declared self-registration set (`auth.audience.selfRegistrationPermissionSet`) is an assignment, and ADR-0131 D3 makes an assignment an organization row. So the grant is now written with the registrant's first membership and owned by that membership's organization, under every posture. Nothing is written to `sys_user_permission_set` without an organization. All runtime changes are in `packages/plugins/plugin-auth/src/auth-manager.ts`: - **`settleSelfRegistrationGrant`** (`user.create.after`). It consumes the admission stage as before, then reads the registrant's membership. - The registrant holds one (under `single`, the reconciler bound the Default Organization a moment earlier in the same hook; or a host hook provisioned an organization first). The grant lands now, owned by that organization. - The registrant holds none (a wall). No grant is written. A pending claim is persisted instead. - **The pending claim** is a `sys_verification` row. Its `identifier` is `self-registration-grant:` plus the user id, its `value` is the set name, and it waits 365 days. - `sys_verification` is the auth layer's existing store of one-shot claims keyed on an identifier with an expiry. It survives a restart, and it has no organization column (ADR-0131 D1 fate 1, inventory `noColumn`). - No new object, no new column, no new field. - **The first-membership seam.** `observeFirstMemberships` is registered once per engine, from the constructor. It is a middleware on `sys_member` inserts, the same seam plugin-security's `organization_admin` auto-grant uses. Every membership writer inserts through the engine: better-auth's organization create (the creator as owner), invitation acceptance and server-side add-member, the membership reconciler, the Default Organization bootstrap, and host hooks. One seam therefore covers all of them, with no hook per path. - **`settleDeferredSelfRegistrationGrant`** consumes the claim first (read, delete by id), then writes the grant owned by that membership's organization. A later membership finds no claim and writes no second grant. The existing by-name check also holds. - An engine with no middleware seam could never settle a claim. There, a registrant with no organization is reported ungranted at `error` at sign-up, and no claim is parked. - **Helper pair, a minimal edit (named as the dispatch asks).** The doc comment on `derivableWriteOrganizationId` no longer lists the self-registration grant among its readers, because the grant does not read it any more. Its code and `authMailOrganizationArg` are unchanged, and no identity-mail send site was touched. ## Measured (A1–A5) - **A1, the membership paths.** The writers of a user's `sys_member` row on this tree are: better-auth `organization/create` (owner) and `accept-invitation`, better-auth add-member, `reconcileMembership` (`user.create.after`, `session.create.before`, the one-time backfill), `ensureDefaultOrganization`'s owner bind, and host `user.create.after` hooks. All of them write through the data engine, so the `sys_member` insert middleware sees each one (#4802's corrected mechanism, quoted in `auth-manager.ts`). The walled dogfood pin drives the real better-auth organization create through it. Under `single`, the census pin shows the sign-up still ends with exactly one grant, owned by the Default Organization. - **A2, persistence.** Admission decides "self-registrant" from the request: the creation class, the bootstrap probe and the pending-invitation lookup. None of those is stored. `sys_user.source` separates only `idp_provisioned` from `env_native`, and `sys_account.provider_id` is `credential` for admin-created users too. So no existing user or account field marks a self-registrant, and a persisted claim is needed. `sys_verification` is the narrowest existing store that fits: deployment-level, durable, and with an expiry better-auth already sweeps (`findVerificationValue` deletes expired rows). The `value` column is `internal`, so it is read back through `recoverInternalFieldsForSystemRead`. - **A3, existing NULL grants.** Untouched here (the ceremony is 8b-0c's). Measurement and recommendation are in the report on #24343. - **A4, pins.** See Tests. - **A5, Clause-②.** `no`. No spec, schema, export or route changes. `AudienceConfigSchema.selfRegistrationPermissionSet` describes "the permission set granted to each self-registrant", and the settings manifest and its translations say the same. None of them promises the grant at sign-up time, and the generated reference page carries only that `describe`. No `packages/spec` byte moved. ## Tests (head `29b223ed3`) - **New:** `plugin-auth/src/self-registration-grant-first-membership.test.ts`, 9 cases. - Under `single`: one grant, owned by the Default Organization, no claim. - Walled sign-up: 0 grants, 1 claim with no organization column. - The first membership: exactly 1 grant, owned by that organization, and the claim is consumed. - A second membership: no second grant. - A restart: a fresh manager over the same store settles the claim. - No claim (an invited user): no grant. An expired claim: no grant. - No middleware seam: reported at `error`, nothing parked. - Two managers on one engine: the seam is registered once. - **New:** `dogfood/test/self-registration-grant-first-membership-walled.dogfood.test.ts`, 3 cases, real stack, `isolated` (`posture-only`), open audience. The sign-up writes no grant. `POST /auth/organization/create` lands exactly one, owned by the new organization. A second organization lands none. - **Changed:** - `audience-posture.test.ts`: the four end-to-end "grant lands" cases now run `single` (a tenancy service), so the reconciler binds a membership, and one of them asserts the owner. - `find-envelope-limb-removal.test.ts`: the D4 grant-by-name case binds the membership first. - `producers-name-organization.test.ts`: its two grant cases are removed. The `single` one is re-pinned in the new file. The walled one asserted the behaviour this stage retires (a grant with no organization), and the new walled pins assert the opposite. - **Ablation** (`scripts/ablation-replace.mjs`, EXIT trap). The claim write was mutated back to a sign-up grant with no organization (marker `ups_ABLATED_`, anchor 1→0, blob `debc7651`→`624afb11`). After the rebuild, `ablation-dist-preflight` found the marker in `dist/index.js` and `dist/index.mjs`. The DTS step failed on TS6133 (the now-unused claim method), but the JS that the suite consumes was emitted. - The walled dogfood pin went red, 2 failed / 1 passed: the sign-up wrote a grant, and the organization grant read `null`. - The unit file went red, 5 failed / 4 passed. - Restore: blob == HEAD, `git diff HEAD` empty, rebuild, preflight `--absent` exit 0, dogfood 3/3 green. - **Suites, at `29b223ed3`:** `@objectstack/plugin-auth` test, 165 files, 3165 passed, 10 skipped; typecheck exit 0. Dogfood, after a plugin-auth rebuild: the walled pin, `signup-organization-census` (single) and `org-create-default-team` (walled), 3 files / 7 passed. - **Gates, at `29b223ed3`:** `dispatch-gates.mjs --commands` (no paths), 108 families plus the 51-row artifact roster, each exit code captured before any pipe. `--ran` reads: 108 derived, 108 run, 0 NOT-MEASURED. - Fixed on the way: `check-tenant-audit-census` (the riders below), `check:engine-double-contract` (ledger row), and `check:where-matcher` (the new double now refuses WHERE combinators). - Roster rows that need a PR context exited 2 (NOT WIRED) locally: `check-closing-target-claim`, `check-single-claim-paths`, and `check-governed-queue-guard` (no event payload, exit 1). CI's reading counts for those. `check-partof-closing-keyword`, run with this body as `PR_BODY`, exits 0. ## Riders - **`content/docs/permissions/tenant-audit-census.mdx` and `docs/audits/2026-08-tenant-audit-write-call-sites.counts.md`.** These were regenerated (`node scripts/tenant-audit-census.mjs --write`) and the page's prose figures updated, because `check-tenant-audit-census` holds them to the census and this stage moves the write-call-site population from 229 to 231. The three plugin-auth writes state `{ context: { isSystem: true } }` at the call, so they count as elevated. The "cite `2 / N`" provable-yield figure stays 2. - **`scripts/engine-double-contract.pinned.json`:** one row for the new test's `delete` double (`check-engine-double-contract --write`). ## Acceptance notes - The claim waits 365 days. A registrant who first joins an organization later holds only the deployment's baseline. Cloud's report (cloud#3051) shows its self-registration set is also its `isDefault` baseline, so nothing changes there. - Under `single` with `membershipPolicy: 'invite-only'`, a self-registrant gets no membership at sign-up, so the grant now waits for the first membership there too, as the ruling's "under every posture" says. Under `auto` (the default), `single` is unchanged. --- _Generated by [Claude Code](https://claude.ai/code/session_01KYBqeqPDxig2tPYhHQxYNX)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 69f342b commit 9524666

10 files changed

Lines changed: 632 additions & 131 deletions
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"@objectstack/plugin-auth": patch
3+
---
4+
5+
fix(plugin-auth): the self-registration grant settles on the registrant's first membership, owned by that organization (ADR-0131 D3)
6+
7+
Clause-②: no
8+
9+
The declared self-registration permission set (`auth.audience.selfRegistrationPermissionSet`) is an assignment, and an assignment is an organization row (ADR-0131 D3). It is now written with the registrant's first membership and owned by that membership's organization, under every posture. It is never written without an organization.
10+
11+
- **`single`: unchanged.** The membership reconciler binds the Default Organization in the same `user.create.after` hook, so a sign-up still ends with one grant, owned by the Default Organization.
12+
- **A wall (`group`, `isolated`).** A self-registrant belongs to no organization at sign-up, so the sign-up writes no `sys_user_permission_set` row. It used to write one with no organization. The grant is held as a pending claim in `sys_verification`, which is deployment-level and survives a restart. The first `sys_member` row written for the user lands exactly one grant, owned by that organization. That row can come from creating an organization (the creator becomes its owner), accepting an invitation, being added by an administrator, or any other membership writer. A later membership writes no second grant.
13+
- **The claim waits 365 days.** A registrant who first joins an organization after that holds only the deployment's baseline. An engine with no middleware seam cannot settle a claim, so there a registrant with no organization is reported ungranted at `error` at sign-up instead.
14+
- Grants already written without an organization by earlier walled sign-ups are not touched here.

‎content/docs/permissions/tenant-audit-census.mdx‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ what moved this page's population from 225 to 227; nothing about the two sites
8383
changed, only whether this instrument could see them.
8484

8585
**The expensive failure direction is a keyword.** Sites whose receiver the author
86-
typed `any` have no type to read, and there are 38 of them — just under a fifth
86+
typed `any` have no type to read, and there are 40 of them — just under a fifth
8787
of the population, concentrated in exactly the seed and bootstrap paths this
8888
control exists for. Scoring an unreadable receiver as "not an engine" would have
8989
dropped every one of them silently, with a clean exit and a smaller number that
@@ -122,7 +122,7 @@ are reported as `undecidable` rather than assumed either way.
122122

123123
The same holds twice over for the context. An options argument spelled as a
124124
literal can be read; one spelled `options`, `{ ...opts }`, or handed through a
125-
forwarding shim cannot, and **53 of the 229 sites are spelled that way**. A
125+
forwarding shim cannot, and **52 of the 231 sites are spelled that way**. A
126126
context resolved from an inline literal or a local `const` can be tested for
127127
`isSystem`; one arriving from a helper call cannot.
128128

@@ -150,8 +150,8 @@ now **0**: nothing on this surface threads a context that provably lacks the fla
150150

151151
**"No tenant context" counted sites it had not read.** An options argument the
152152
walker could not parse was folded into the same bucket as one it had read and
153-
found empty. That published **61 sites "carrying no tenant context at all"**
154-
when 8 said so and 53 were simply unread — an over-claim in the *alarming*
153+
found empty. That published **60 sites "carrying no tenant context at all"**
154+
when 8 said so and 52 were simply unread — an over-claim in the *alarming*
155155
direction, on the very figure this page tells other cards to cite. `carries` is
156156
now three-valued, and an unreadable argument can never contribute to the
157157
provable count.
@@ -187,10 +187,10 @@ reproduce them. Where it disagrees, it disagrees on the page:
187187

188188
| carried figure | where it survives | this census |
189189
| :--- | :--- | ---: |
190-
| 175 write call sites | quoted in the merged changeset | **229** |
191-
| 24 carrying no tenant context | quoted in the merged changeset | **2** provable and tenancy-enabled; **32** more whose options argument is unreadable |
192-
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card | **158 of 229** decidable, **71** undecidable |
193-
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 125 decidably elevated, 0 decidably not, 96 undecidable |
190+
| 175 write call sites | quoted in the merged changeset | **231** |
191+
| 24 carrying no tenant context | quoted in the merged changeset | **2** provable and tenancy-enabled; **31** more whose options argument is unreadable |
192+
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card | **160 of 231** decidable, **71** undecidable |
193+
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 128 decidably elevated, 0 decidably not, 95 undecidable |
194194
| 141 and 132, two independent re-derivations | the card that filed this work | — |
195195

196196
**The differences are not reconciled, and deliberately so.** The old census's
@@ -200,21 +200,21 @@ be stated is what this instrument counts, which is written above and re-runnable
200200
at any commit.
201201

202202
Two structural facts do plausibly widen this reading against any hand or regex
203-
one, and both are counted in the generated tables below: the 38 sites reached
203+
one, and both are counted in the generated tables below: the 40 sites reached
204204
through an erased (`any`) receiver, and the 52 that name their object through a
205205
`const` rather than inline. An instrument that read either the way a person does
206206
would report a smaller number and would not say so.
207207

208208
The fourth row is the one worth flagging to anyone citing it. **The 135 / 77%
209209
figure has no surviving corroboration anywhere in the tree.** This census reads
210-
125 of 229 (55%) as decidably elevated, with 96 more whose elevation is a
210+
128 of 231 (55%) as decidably elevated, with 95 more whose elevation is a
211211
run-time fact — so the claim is neither confirmed nor refuted, and the honest
212212
answer is that a static reading cannot settle it.
213213

214-
⇒ **Cite `2 / 229`, and say what it is**: the sites whose options argument was
214+
⇒ **Cite `2 / 231`, and say what it is**: the sites whose options argument was
215215
READ and holds no tenant context, against a decidably tenancy-enabled object.
216216
That is the control's provable yield surface. ⛔ Do not cite it as "the sites
217-
without tenant context" — **32 further sites** have an options argument this
217+
without tenant context" — **31 further sites** have an options argument this
218218
cannot read, and they are neither in nor out.
219219

220220
{/* BEGIN GENERATED: tenant-audit-census (scripts/tenant-audit-census.mjs) — DO NOT EDIT */}
@@ -223,28 +223,28 @@ cannot read, and they are neither in nor out.
223223

224224
| what | count |
225225
| :--- | ---: |
226-
| write call sites on the application surface | **229** |
227-
| …whose object name is statically decidable | 158 |
226+
| write call sites on the application surface | **231** |
227+
| …whose object name is statically decidable | 160 |
228228
| …whose object name is chosen at run time | 71 |
229-
| …against an object with tenancy ENABLED | 157 |
229+
| …against an object with tenancy ENABLED | 159 |
230230
| …against an object that declares tenancy off | 1 |
231-
| threading a tenant context | 168 |
231+
| threading a tenant context | 171 |
232232
| PROVABLY carrying none (options read, no context key) | **8** |
233233
| …of those, against a decidably tenancy-enabled object | **2** |
234-
| options argument UNREADABLE — may or may not carry one | 53 |
235-
| …of those, against a decidably tenancy-enabled object | 32 |
236-
| threading a decidably ELEVATED (`isSystem`) context | 125 |
234+
| options argument UNREADABLE — may or may not carry one | 52 |
235+
| …of those, against a decidably tenancy-enabled object | 31 |
236+
| threading a decidably ELEVATED (`isSystem`) context | 128 |
237237
| threading a context that is decidably NOT elevated | 0 |
238-
| threading a context whose elevation is a run-time fact | 96 |
238+
| threading a context whose elevation is a run-time fact | 95 |
239239

240240
| how the instrument reached the site | count |
241241
| :--- | ---: |
242242
| receiver carried a readable engine type | 191 |
243-
| receiver erased, placed by the object NAME | 28 |
243+
| receiver erased, placed by the object NAME | 30 |
244244
| receiver erased, placed by an `object: string` PARAMETER | 5 |
245245
| receiver erased, placed by an `UNTYPED_RECEIVERS` row | 5 |
246246

247-
| object name spelled inline | 106 |
247+
| object name spelled inline | 108 |
248248
| object name spelled through a `const` | 52 |
249249
| object name is an `object: string` parameter | 7 |
250250
| object name is some other run-time expression | 64 |
@@ -297,13 +297,13 @@ holds still. They are required to be HERE and to say WHEN they were true;
297297
their values are not compared. The reasoning, and the measurement behind it,
298298
are in `scripts/check-tenant-audit-census.mjs`.
299299

300-
Measured on 2026-10-16 at `22b217924`.
300+
Measured on 2026-10-19 at `2623d6d6c`.
301301

302302
| corpus scale (not enforced) | count |
303303
| :--- | ---: |
304-
| tracked non-test sources scanned | 657 |
304+
| tracked non-test sources scanned | 670 |
305305
| engine-shaped types recognised | 79 |
306306
| declared objects in the registry | 116 |
307-
| same-named calls subtracted as non-engine | 165 |
307+
| same-named calls subtracted as non-engine | 166 |
308308

309309
{/* END GENERATED: tenant-audit-census */}

‎docs/audits/2026-08-tenant-audit-write-call-sites.counts.md‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ silent, and `node scripts/tenant-audit-census.mjs --write` is the resolution.
3333

3434
| Measure | Value |
3535
|---|---:|
36-
| Write call sites | 229 |
37-
| Object name statically decidable | 158 |
36+
| Write call sites | 231 |
37+
| Object name statically decidable | 160 |
3838
| Object name chosen at run time | 71 |
39-
| Against a tenancy-enabled object | 157 |
39+
| Against a tenancy-enabled object | 159 |
4040
| Against an object declaring tenancy off | 1 |
41-
| Threading a tenant context | 168 |
41+
| Threading a tenant context | 171 |
4242
| Provably carrying none | 8 |
4343
| …and decidably tenancy-enabled | 2 |
44-
| Options argument unreadable | 53 |
45-
| …and decidably tenancy-enabled | 32 |
46-
| Threading a decidably elevated context | 125 |
44+
| Options argument unreadable | 52 |
45+
| …and decidably tenancy-enabled | 31 |
46+
| Threading a decidably elevated context | 128 |
4747
| Threading a decidably non-elevated context | 0 |
48-
| Threading a context of undecidable elevation | 96 |
48+
| Threading a context of undecidable elevation | 95 |
4949

5050
## Subtractions the census could NOT defend — enforced
5151

@@ -90,14 +90,14 @@ holds still. They are required to be HERE and to say WHEN they were true;
9090
their values are not compared. The reasoning, and the measurement behind it,
9191
are in `scripts/check-tenant-audit-census.mjs`.
9292

93-
Measured on 2026-10-16 at `22b217924`.
93+
Measured on 2026-10-19 at `2623d6d6c`.
9494

9595
| corpus scale (not enforced) | count |
9696
| :--- | ---: |
97-
| tracked non-test sources scanned | 657 |
97+
| tracked non-test sources scanned | 670 |
9898
| engine-shaped types recognised | 79 |
9999
| declared objects in the registry | 116 |
100-
| same-named calls subtracted as non-engine | 165 |
100+
| same-named calls subtracted as non-engine | 166 |
101101

102102
## Every site
103103

@@ -133,7 +133,9 @@ Measured on 2026-10-16 at `22b217924`.
133133
| `packages/plugins/plugin-auth/src/auth-manager.ts` | `update` | `sys_session` | enabled | options unreadable | 3 |
134134
| `packages/plugins/plugin-auth/src/auth-manager.ts` | `update` | `sys_two_factor` | enabled | options unreadable | 1 |
135135
| `packages/plugins/plugin-auth/src/auth-manager.ts` | `update` | `sys_user` | enabled | options unreadable | 8 |
136-
| `packages/plugins/plugin-auth/src/auth-manager.ts` | `insert` | `sys_user_permission_set` | enabled | options unreadable | 1 |
136+
| `packages/plugins/plugin-auth/src/auth-manager.ts` | `insert` | `sys_user_permission_set` | enabled | elevated | 1 |
137+
| `packages/plugins/plugin-auth/src/auth-manager.ts` | `delete` | `sys_verification` | enabled | elevated | 1 |
138+
| `packages/plugins/plugin-auth/src/auth-manager.ts` | `insert` | `sys_verification` | enabled | elevated | 1 |
137139
| `packages/plugins/plugin-auth/src/auth-plugin.ts` | `update` | `sys_oauth_application` | enabled | PROVABLY NONE | 1 |
138140
| `packages/plugins/plugin-auth/src/auth-plugin.ts` | `update` | `sys_user` | enabled | elevated | 1 |
139141
| `packages/plugins/plugin-auth/src/auth-plugin.ts` | `update` | `SystemObjectName.USER` | undecidable | elevated | 1 |

‎packages/plugins/plugin-auth/src/audience-posture.test.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ const PASSWORD = 'S3cure!Passw0rd-4785';
122122
const bindRowCatalog = (engine: any) =>
123123
bindTestSecurityCatalog(engine, () => catalogFromTables({ sys_permission_set: engine.tables.get('sys_permission_set') }));
124124

125+
/**
126+
* [ADR-0131 D3] The self-registration grant is written WITH a membership. The
127+
* end-of-chain cases that assert the grant lands at sign-up run `single`: the
128+
* reconciler binds the Default Organization in the same `user.create.after`
129+
* hook, and the grant is owned by it. The walled half (no membership yet, the
130+
* grant held as a claim until the first one) is pinned in
131+
* `self-registration-grant-first-membership.test.ts`.
132+
*/
133+
const SINGLE_TENANCY = () => ({ defaultOrgId: async () => 'org_default' });
134+
125135
const makeManager = (engine: any, config: Record<string, unknown> = {}) =>
126136
new AuthManager({
127137
secret: SECRET,
@@ -731,6 +741,7 @@ describe('end of the chain: better-auth pipeline over the memory engine (#11739)
731741
seedExistingUser(engine);
732742
seedPermissionSet(engine, 'portal_user');
733743
const manager = makeManager(engine, {
744+
getTenancy: SINGLE_TENANCY,
734745
audience: {
735746
posture: 'email_domain',
736747
allowedEmailDomains: ['acme.com'],
@@ -747,6 +758,8 @@ describe('end of the chain: better-auth pipeline over the memory engine (#11739)
747758
expect(grants[0].permission_set).toBe('portal_user');
748759
const created = (engine.tables.get('sys_user') ?? []).find((u: any) => u.email === 'user+tag@acme.com');
749760
expect(grants[0].user_id).toBe(created?.id);
761+
// ADR-0131 D3: owned by the membership it travels with.
762+
expect(grants[0].organization_id).toBe('org_default');
750763
});
751764

752765
const refused = await signUp(manager, 'user@mail.acme.com'); // subdomain: NOT implied
@@ -764,6 +777,7 @@ describe('end of the chain: better-auth pipeline over the memory engine (#11739)
764777
const engine = createMemoryEngine();
765778
seedExistingUser(engine);
766779
const manager = makeManager(engine, {
780+
getTenancy: SINGLE_TENANCY,
767781
audience: { posture: 'open', selfRegistrationPermissionSet: 'portal_user' },
768782
});
769783
bindTestSecurityCatalog(engine, { permissions: [{ name: 'portal_user' }] });
@@ -838,6 +852,7 @@ describe('end of the chain: better-auth pipeline over the memory engine (#11739)
838852
seedExistingUser(engine);
839853
seedPermissionSet(engine, 'member_default', { active: false });
840854
const manager = makeManager(engine, {
855+
getTenancy: SINGLE_TENANCY,
841856
audience: { posture: 'open', selfRegistrationPermissionSet: 'member_default' },
842857
});
843858
const res = await signUp(manager, 'anyone@anywhere.com');
@@ -852,6 +867,7 @@ describe('end of the chain: better-auth pipeline over the memory engine (#11739)
852867
seedExistingUser(engine);
853868
seedPermissionSet(engine, 'member_default');
854869
const manager = makeManager(engine, {
870+
getTenancy: SINGLE_TENANCY,
855871
audience: { posture: 'open', selfRegistrationPermissionSet: 'member_default' },
856872
});
857873
const res = await signUp(manager, 'anyone@anywhere.com');

0 commit comments

Comments
 (0)