@shivaedev/identity 0.3.2 → 0.4.0
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/README.md +25 -1
- package/dist/server/better-auth/testing.d.ts +25 -0
- package/dist/server/better-auth/testing.d.ts.map +1 -1
- package/dist/server/better-auth/testing.js +8 -0
- package/dist/server/better-auth/testing.js.map +1 -1
- package/dist/server/better-auth/userReference.d.ts +5 -0
- package/dist/server/better-auth/userReference.d.ts.map +1 -0
- package/dist/server/better-auth/userReference.js +2 -0
- package/dist/server/better-auth/userReference.js.map +1 -0
- package/dist/server/local.d.ts.map +1 -1
- package/dist/server/local.js +2 -1
- package/dist/server/local.js.map +1 -1
- package/package.json +13 -13
- package/src/server/better-auth/testing.ts +12 -0
- package/src/server/better-auth/userReference.ts +1 -0
- package/src/server/local.ts +2 -1
package/README.md
CHANGED
|
@@ -418,6 +418,27 @@ Caller-chosen request ids are correlation data. Keep authorization tied to the a
|
|
|
418
418
|
|
|
419
419
|
The app host of `@shivaedev/server` adds this tracing to its RPC group and continues the caller's W3C trace; react's [action tracing](https://github.com/ShivaeDev/platform/blob/main/packages/react/README.md#trace-an-action-across-rpcs) follows one browser action through RPC, SQL and a queued job.
|
|
420
420
|
|
|
421
|
+
### Reference users from app tables
|
|
422
|
+
|
|
423
|
+
App tables reference users by foreign key. Import `userReference` for the default Better Auth user table and id column, and use native Effect SQL identifiers in the app's migration:
|
|
424
|
+
|
|
425
|
+
```ts
|
|
426
|
+
import { Effect } from "effect";
|
|
427
|
+
import { SqlClient } from "effect/sql";
|
|
428
|
+
import { userReference } from "@shivaedev/identity/server/better-auth/userReference.ts";
|
|
429
|
+
|
|
430
|
+
export default Effect.gen(function* () {
|
|
431
|
+
const sql = yield* SqlClient.SqlClient;
|
|
432
|
+
yield* sql`create table notes (
|
|
433
|
+
id serial primary key,
|
|
434
|
+
user_id text not null references ${sql(userReference.table)} (${sql(userReference.column)}) on delete cascade,
|
|
435
|
+
title text not null
|
|
436
|
+
)`;
|
|
437
|
+
});
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
Run the auth schema migration before the app migration. Use `ON DELETE CASCADE` to delete owned rows with their user, or a nullable `user_id` and `ON DELETE SET NULL` to retain rows without an owner. `userReference` describes the default PostgreSQL mapping, so an application that customizes Better Auth's user table or id column must use its own mapping. Account reads and writes still go through identity; the foreign key grants no access to auth data. Quality's `boundaries/auth-sql` accepts these references while rejecting other auth SQL outside the configured owners.
|
|
441
|
+
|
|
421
442
|
### Signed-in story preconditions
|
|
422
443
|
|
|
423
444
|
Use `testUtils()` from `better-auth/plugins` in a test-only Better Auth instance with the host's database, secret and cookie policy. Keep the plugin out of production auth options.
|
|
@@ -443,6 +464,8 @@ const { user, headers, cookies } = await signedInUser(testAuth, {
|
|
|
443
464
|
|
|
444
465
|
`options` is the application's auth configuration. `signedInUser` saves the supplied user fields, creates each optional `providerAccounts` entry for that user through Better Auth's internal adapter, and mints one session through Better Auth's `testUtils`, without OAuth or password hashing. The accounts carry no tokens or password. Omitting `providerAccounts` creates only the user and session. It returns Better Auth's login result: the user, session, signed request headers, browser cookies and token. Roles require the application's role plugin, such as Better Auth's `admin()`. Send `headers` to the real host, or pass `cookies` to test-story's `seedCookies` in a DOM story after setting its host location with `domFetch`. Keep a real sign-in story for each sign-in flow; feature stories start from the minted precondition.
|
|
445
466
|
|
|
467
|
+
`passwordUser(auth, { email, password, ...fields })` from the same testing module saves a user and a credential account using Better Auth's configured password hasher, and returns an Effect containing the user without minting a session. Use it for the one story that signs in through `/api/auth/sign-in/email`; keep feature stories on `signedInUser` so they avoid password hashing.
|
|
468
|
+
|
|
446
469
|
Use `storedProviderAccounts(auth, userId)` to observe credential storage through Better Auth's internal adapter. It returns account and provider IDs with `hasAccessToken`, `hasRefreshToken`, `hasIdToken` and `hasPassword` booleans. It never returns token values, passwords or password hashes. A DOM story kit that exposes its test auth instance and a session readout can use both helpers:
|
|
447
470
|
|
|
448
471
|
```ts
|
|
@@ -510,8 +533,9 @@ Import the module that defines the name; there is no package-root entry. Paths b
|
|
|
510
533
|
| `server/better-auth/revokeUnadmitted.ts` | `RevokedSessions`: the `{ users, sessions }` counts of a revocation. |
|
|
511
534
|
| `server/better-auth/userProfiles.ts` | Public profile lookups for other users. |
|
|
512
535
|
| `server/better-auth/sweepExpiredSessions.ts` | `sweepExpiredSessions`: delete expired sessions through the application's SQL client and return the number removed. |
|
|
536
|
+
| `server/better-auth/userReference.ts` | `userReference`: the default auth user table and id column for application foreign keys. |
|
|
513
537
|
| `server/better-auth/testDatabase.ts` | `authTestDatabase(pool)`: test-only identity/session readouts and faults for the default PostgreSQL auth schema. |
|
|
514
|
-
| `server/better-auth/testing.ts` | `signedInUser(auth, fields)`, `storedProviderAccounts(auth, userId)`: test-only minted
|
|
538
|
+
| `server/better-auth/testing.ts` | `signedInUser(auth, fields)`, `passwordUser(auth, fields)`, `storedProviderAccounts(auth, userId)`: test-only users, minted sessions and credential storage observations. |
|
|
515
539
|
|
|
516
540
|
### Install, setup and limits
|
|
517
541
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AuthContext } from "better-auth";
|
|
2
2
|
import type { testUtils } from "better-auth/plugins";
|
|
3
|
+
import { Effect } from "effect";
|
|
3
4
|
type TestContext = ReturnType<ReturnType<typeof testUtils>["init"]>["context"];
|
|
4
5
|
type AccountContext = Pick<AuthContext, "internalAdapter">;
|
|
5
6
|
export declare function signedInUser(auth: {
|
|
@@ -20,5 +21,29 @@ export declare function storedProviderAccounts(auth: {
|
|
|
20
21
|
hasRefreshToken: boolean;
|
|
21
22
|
providerId: string;
|
|
22
23
|
}[]>;
|
|
24
|
+
export declare const passwordUser: (auth: {
|
|
25
|
+
readonly $context: Promise<TestContext & AccountContext & {
|
|
26
|
+
readonly password: Pick<AuthContext["password"], "hash">;
|
|
27
|
+
}>;
|
|
28
|
+
}, args_1: Partial<{
|
|
29
|
+
id: string;
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
updatedAt: Date;
|
|
32
|
+
email: string;
|
|
33
|
+
emailVerified: boolean;
|
|
34
|
+
name: string;
|
|
35
|
+
image?: string | null | undefined;
|
|
36
|
+
}> & Record<string, unknown> & {
|
|
37
|
+
readonly email: string;
|
|
38
|
+
readonly password: string;
|
|
39
|
+
}) => Effect.Effect<{
|
|
40
|
+
id: string;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
updatedAt: Date;
|
|
43
|
+
email: string;
|
|
44
|
+
emailVerified: boolean;
|
|
45
|
+
name: string;
|
|
46
|
+
image?: string | null | undefined;
|
|
47
|
+
}, never, never>;
|
|
23
48
|
export {};
|
|
24
49
|
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/server/better-auth/testing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/server/better-auth/testing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,KAAK,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAC/E,KAAK,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;AAE3D,wBAAsB,YAAY,CACjC,IAAI,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,WAAW,GAAG,cAAc,CAAC,CAAA;CAAE,EAClE,EACC,gBAAqB,EACrB,GAAG,MAAM,EACT,EAAE,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;IACrD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACnG,sDAQD;AAED,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CAAE,EAAE,MAAM,EAAE,MAAM;;;;;;;KAWhH;AAED,eAAO,MAAM,YAAY;uBACG,OAAO,CAAC,WAAW,GAAG,cAAc,GAAG;QAAE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;;;;;;;;;;oBACjC,MAAM;uBAAqB,MAAM;;;;;;;;;gBAO9H,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
1
2
|
export async function signedInUser(auth, { providerAccounts = [], ...fields }) {
|
|
2
3
|
const { test, internalAdapter } = await auth.$context;
|
|
3
4
|
const user = await test.saveUser(test.createUser(fields));
|
|
@@ -18,4 +19,11 @@ export async function storedProviderAccounts(auth, userId) {
|
|
|
18
19
|
providerId,
|
|
19
20
|
}));
|
|
20
21
|
}
|
|
22
|
+
export const passwordUser = Effect.fnUntraced(function* (auth, { password, ...fields }) {
|
|
23
|
+
const { test, internalAdapter, password: credential } = yield* Effect.promise(() => auth.$context);
|
|
24
|
+
const user = yield* Effect.promise(() => test.saveUser(test.createUser(fields)));
|
|
25
|
+
const hash = yield* Effect.promise(() => credential.hash(password));
|
|
26
|
+
yield* Effect.promise(() => internalAdapter.createAccount({ accountId: user.id, password: hash, providerId: "credential", userId: user.id }));
|
|
27
|
+
return user;
|
|
28
|
+
});
|
|
21
29
|
//# sourceMappingURL=testing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../src/server/better-auth/testing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../src/server/better-auth/testing.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKhC,MAAM,CAAC,KAAK,UAAU,YAAY,CACjC,IAAkE,EAClE,EACC,gBAAgB,GAAG,EAAE,EACrB,GAAG,MAAM,EAGT;IAED,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC;IACtD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1D,KAAK,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,gBAAgB,EAAE,CAAC;QAC1D,MAAM,eAAe,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,IAAoD,EAAE,MAAc;IAChH,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC;IAChD,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC5D,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QACjG,SAAS;QAC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AK,MAAM,EAAE,IAAI;aAAE,KAAK,EAAE,MAAM;CAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userReference.js","sourceRoot":"","sources":["../../../src/server/better-auth/userReference.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../src/server/local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAoB,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAsB9C,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,OAAO,CAWhF;AACD,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAChC,OAAO,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,iBAAiB,KAAK,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,CAAC,EAAE,CAAC,CAAC,aAEpG,iBAAiB,CAAC,iBAAiB,gEAIpD;AACD,wBAAgB,gBAAgB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAGpF;AACD,wBAAgB,kBAAkB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAElE;AAkBD,wBAAgB,cAAc,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,aAAa,GAAE,SAAS,MAAM,EAAO,aAEzE,iBAAiB,CAAC,iBAAiB,KAAG,OAAO,CAK9D;AACD,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EACjC,MAAM,EAAE,MAAM,CAAC,MAAM,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@ -78,7 +78,8 @@ export function localRpcGuard(effect, trustedProxy, nativeOrigins = []) {
|
|
|
78
78
|
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
79
79
|
const serialization = yield* RpcSerialization.RpcSerialization;
|
|
80
80
|
const contentType = request.headers["content-type"]?.split(";")[0]?.trim().toLowerCase();
|
|
81
|
-
|
|
81
|
+
const legacyNdjson = serialization.contentType === RpcSerialization.ndjson.contentType && contentType === "application/ndjson";
|
|
82
|
+
return allowed(request) && (contentType === serialization.contentType || legacyNdjson)
|
|
82
83
|
? yield* continueHttpTrace(effect, request)
|
|
83
84
|
: HttpServerResponse.text("Local same-origin requests only", { status: HttpStatus.fromLiteral("Forbidden") });
|
|
84
85
|
});
|
package/dist/server/local.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../src/server/local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,kBAAkB,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEjF,SAAS,eAAe,CAAC,OAAe;IACvC,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACvC,OAAO,QAAQ,KAAK,KAAK,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC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AE,CAAC,WAAW,EAAE,CAAC;QACzF,MAAM,YAAY,GAAG,aAAa,CAAC,WAAW,KAAK,gBAAgB,CAAC,MAAM,CAAC,WAAW,IAAI,WAAW,KAAK,oBAAoB,CAAC;QAC/H,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,KAAK,aAAa,CAAC,WAAW,IAAI,YAAY,CAAC;YACrF,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC;YAC3C,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAChH,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,iBAAiB,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAW,MAA8B,EAAE,OAA4C;IAC3I,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACvD,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC;IACtB,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtG,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/identity",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Request identity, sessions, transport trust and permission enforcement for Effect RPC servers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"effect"
|
|
@@ -44,29 +44,29 @@
|
|
|
44
44
|
"README.md"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@shivaedev/access": "0.1.
|
|
48
|
-
"@shivaedev/changes": "0.5.
|
|
49
|
-
"@shivaedev/contract": "0.
|
|
50
|
-
"@shivaedev/errors": "0.1.
|
|
51
|
-
"@shivaedev/sql": "0.
|
|
47
|
+
"@shivaedev/access": "0.1.2",
|
|
48
|
+
"@shivaedev/changes": "0.5.1",
|
|
49
|
+
"@shivaedev/contract": "0.21.0",
|
|
50
|
+
"@shivaedev/errors": "0.1.1",
|
|
51
|
+
"@shivaedev/sql": "0.25.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@effect/platform-node": "4.0.
|
|
55
|
-
"@effect/sql-pg": "4.0.
|
|
56
|
-
"@shivaedev/quality": "0.
|
|
57
|
-
"@shivaedev/test-sql": "0.
|
|
58
|
-
"@shivaedev/test-story": "0.
|
|
54
|
+
"@effect/platform-node": "4.0.6",
|
|
55
|
+
"@effect/sql-pg": "4.0.6",
|
|
56
|
+
"@shivaedev/quality": "0.45.0",
|
|
57
|
+
"@shivaedev/test-sql": "0.11.0",
|
|
58
|
+
"@shivaedev/test-story": "0.24.0",
|
|
59
59
|
"@types/node": "24.19.2",
|
|
60
60
|
"@types/pg": "8.20.0",
|
|
61
61
|
"better-auth": "1.7.12",
|
|
62
|
-
"effect": "4.0.
|
|
62
|
+
"effect": "4.0.6",
|
|
63
63
|
"pg": "8.23.0",
|
|
64
64
|
"typescript": "7.0.2",
|
|
65
65
|
"vitest": "5.0.5"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"better-auth": "1.7.12",
|
|
69
|
-
"effect": "4.0.
|
|
69
|
+
"effect": "4.0.6",
|
|
70
70
|
"pg": "8.23.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependenciesMeta": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AuthContext } from "better-auth";
|
|
2
2
|
import type { testUtils } from "better-auth/plugins";
|
|
3
|
+
import { Effect } from "effect";
|
|
3
4
|
|
|
4
5
|
type TestContext = ReturnType<ReturnType<typeof testUtils>["init"]>["context"];
|
|
5
6
|
type AccountContext = Pick<AuthContext, "internalAdapter">;
|
|
@@ -33,3 +34,14 @@ export async function storedProviderAccounts(auth: { readonly $context: Promise<
|
|
|
33
34
|
providerId,
|
|
34
35
|
}));
|
|
35
36
|
}
|
|
37
|
+
|
|
38
|
+
export const passwordUser = Effect.fnUntraced(function* (
|
|
39
|
+
auth: { readonly $context: Promise<TestContext & AccountContext & { readonly password: Pick<AuthContext["password"], "hash"> }> },
|
|
40
|
+
{ password, ...fields }: Parameters<TestContext["test"]["createUser"]>[0] & { readonly email: string; readonly password: string },
|
|
41
|
+
) {
|
|
42
|
+
const { test, internalAdapter, password: credential } = yield* Effect.promise(() => auth.$context);
|
|
43
|
+
const user = yield* Effect.promise(() => test.saveUser(test.createUser(fields)));
|
|
44
|
+
const hash = yield* Effect.promise(() => credential.hash(password));
|
|
45
|
+
yield* Effect.promise(() => internalAdapter.createAccount({ accountId: user.id, password: hash, providerId: "credential", userId: user.id }));
|
|
46
|
+
return user;
|
|
47
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const userReference = { column: "id", table: "user" } as const;
|
package/src/server/local.ts
CHANGED
|
@@ -85,7 +85,8 @@ export function localRpcGuard<E, R>(
|
|
|
85
85
|
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
86
86
|
const serialization = yield* RpcSerialization.RpcSerialization;
|
|
87
87
|
const contentType = request.headers["content-type"]?.split(";")[0]?.trim().toLowerCase();
|
|
88
|
-
|
|
88
|
+
const legacyNdjson = serialization.contentType === RpcSerialization.ndjson.contentType && contentType === "application/ndjson";
|
|
89
|
+
return allowed(request) && (contentType === serialization.contentType || legacyNdjson)
|
|
89
90
|
? yield* continueHttpTrace(effect, request)
|
|
90
91
|
: HttpServerResponse.text("Local same-origin requests only", { status: HttpStatus.fromLiteral("Forbidden") });
|
|
91
92
|
});
|