@jxsuite/auth 0.5.5 → 0.5.7

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.
Files changed (2) hide show
  1. package/README.md +11 -11
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -6,10 +6,10 @@
6
6
 
7
7
  `@jxsuite/auth` is the Jx extension putting users behind the connector's data tables. It owns the
8
8
  project.json `auth` section and mounts [Better Auth](https://better-auth.com) at
9
- `/_jx/auth` — **order 10**, ahead of the connector's `/_jx/data` mount (order 20) — publishing the
10
- `ctx.auth = { getSession, authorize }` hooks on the shared server context
11
- (specs/extensions.md §11). With this mount active, table permission rules beyond
12
- `public`/`none` come alive:
9
+ `/_jx/auth`, publishing the `ctx.auth = { getSession, authorize }` hooks on the shared server
10
+ context (specs/extensions.md §11). That mount runs at **order 10**, ahead of the connector's
11
+ `/_jx/data` mount (order 20). With it active, table permission rules beyond `public`/`none` come
12
+ alive:
13
13
 
14
14
  | Rule | Grants |
15
15
  | --------------- | ------------------------------------------------------------------------------------------------- |
@@ -24,10 +24,10 @@ Declaring an `ownerField` makes that column authoritative: **every** session-gra
24
24
  never forge ownership.
25
25
 
26
26
  The auth system tables (`user`, `session`, `account`, `verification`) live on an ordinary
27
- connector connection — `auth.connection`, defaulting to the project's first-declared connection —
28
- and are created by Better Auth's additive migrations: `jx db push` (or the Studio's push button)
29
- plans them as `kind: "auth"` steps after the connector plan, and the dev server also syncs them on
30
- first touch of `/_jx/auth`.
27
+ connector connection, named by `auth.connection` and defaulting to the project's first-declared
28
+ connection. Better Auth's additive migrations create them: `jx db push` (or the Studio's push
29
+ button) plans them as `kind: "auth"` steps after the connector plan, and the dev server also syncs
30
+ them on first touch of `/_jx/auth`.
31
31
 
32
32
  ## Enable it
33
33
 
@@ -74,14 +74,14 @@ var named by `auth.secretEnv` (default `BETTER_AUTH_SECRET`) in `.dev.vars` loca
74
74
  - **`Session`** resolves to `{ userId, role?, user }` or `null` and updates live via
75
75
  `subscribe()`. Outside browsers it resolves to `null`, so statically generated pages always
76
76
  render the signed-out state.
77
- - **`AuthActions`** resolves to `{ signInEmail, signUpEmail, signInSocial, signOut }` — wire a
77
+ - **`AuthActions`** resolves to `{ signInEmail, signUpEmail, signInSocial, signOut }`. Wire a
78
78
  form's `onsubmit` to `{ "$ref": "auth.signInEmail" }` and the handler reads the form's
79
79
  `email`/`password` fields, refreshes the session store, bumps the `_v` read-after-write version,
80
80
  and applies `auth.redirects`.
81
81
 
82
82
  ## v1 cuts
83
83
 
84
- - **No email transport**: no verification or password-reset emails ship in v1 — email/password
84
+ - **No email transport**: no verification or password-reset emails ship in v1, so email/password
85
85
  accounts are live immediately after sign-up.
86
86
  - **Roles are edited via the data grid**: declare role names in `auth.roles` (this adds the
87
87
  `role` column to the user table); assign them by editing user rows in the Studio's data grid.
@@ -92,6 +92,6 @@ var named by `auth.secretEnv` (default `BETTER_AUTH_SECRET`) in `.dev.vars` loca
92
92
 
93
93
  ## Versioning
94
94
 
95
- Published to npm as `@jxsuite/auth` — TypeScript source, like every `@jxsuite` package, following
95
+ Published to npm as `@jxsuite/auth`, TypeScript source like every `@jxsuite` package, following
96
96
  the monorepo's release train. Depends on `@jxsuite/connector` (the `resolveDialect` seam and the
97
97
  permission/hook types it publishes for dependents); core packages never depend on this extension.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jxsuite/auth",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "description": "Better Auth sessions, sign-in flows, and table permissions for Jx sites over /_jx/auth",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -35,16 +35,16 @@
35
35
  "scripts": {
36
36
  "test": "bun test --isolate",
37
37
  "test:coverage": "bun test --isolate --coverage",
38
- "upgrade": "bunx npm-check-updates -u && bun install"
38
+ "upgrade": "bun update --latest && bun install"
39
39
  },
40
40
  "dependencies": {
41
- "@jxsuite/connector": "^0.5.5",
42
- "@jxsuite/schema": "^1.9.0",
43
- "better-auth": "^1.7.1",
41
+ "@jxsuite/connector": "^0.5.7",
42
+ "@jxsuite/schema": "^2.1.0",
43
+ "better-auth": "^1.7.2",
44
44
  "kysely": "^0.29.5"
45
45
  },
46
46
  "devDependencies": {
47
- "@happy-dom/global-registrator": "^20.11.6",
47
+ "@happy-dom/global-registrator": "^20.12.0",
48
48
  "ajv": "^8.20.0"
49
49
  },
50
50
  "jx": "./jx-extension.json"