@jskit-ai/auth-provider-local-db-core 0.1.177 → 0.1.178

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/CHANGELOG.md +1 -0
  2. package/package.json +7 -8
package/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - The package manifest no longer requires `runtime.actions`: its feature declares no actions, so since the kernel's 9646ecf21 it does not require the action catalogue, and the catalog's manifest check reported the requirement as one no server provider has.
5
6
  - Second factors in the database: the table `auth_local_second_factors` (one row per account, deleted with it) and the sessions' `second_factor_at` column, created by the new migration `auth_local_db_users_second_factors`, behind the backend contract's `secondFactors` collection and `sessions.markSecondFactorProved` / `sessions.clearSecondFactorForUser`. `LOCAL_AUTH_DB_TABLES.secondFactors` names the table, which the package owns.
6
7
  - `auth.local.recovery.consumeForUser(userId, { ...options, idPrefix })` consumes only the user's open tokens whose id starts with `idPrefix`, such as `"rec_"` for a password reset's, and requires it (a `TypeError` without one). It consumed every open token of the user, so an app's new sign-in link (its own `magic_…` tokens) cancelled an outstanding password reset, and a reset its links. The prefix is compared exactly, never as a LIKE pattern, through the recovery table's new server-only `idPrefix` filter. The backend's `recovery.consumeForUser(userId, { idPrefix })` takes it too.
7
8
  - `auth.local.sessions.update(sessionId, changes, { ...options, onlyIf })` changes the session only while it still has the `onlyIf` values (`userId`, `purpose`, `revokedAt`; others are refused), compared in the one UPDATE, and answers null, writing nothing, when it is missing or no longer matches. An app promotes a sign-in link's session with `onlyIf: { userId, purpose: "recovery", revokedAt: null }` instead of updating it unconditionally and checking afterwards. Its tests run on SQLite, MariaDB/MySQL and PostgreSQL (`tokenKinds*.test.js`; the PostgreSQL one in CI's PostgreSQL job).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/auth-provider-local-db-core",
3
- "version": "0.1.177",
3
+ "version": "0.1.178",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "jskit test"
@@ -11,14 +11,14 @@
11
11
  "./server/types": "./src/server/types.js"
12
12
  },
13
13
  "dependencies": {
14
- "@jskit-ai/auth-provider-local-core": "0.2.28",
15
- "@jskit-ai/resource-core": "0.1.213"
14
+ "@jskit-ai/auth-provider-local-core": "0.2.29",
15
+ "@jskit-ai/resource-core": "0.1.214"
16
16
  },
17
17
  "peerDependencies": {
18
- "@jskit-ai/auth-core": "0.2.23",
19
- "@jskit-ai/database-runtime": "0.1.271",
20
- "@jskit-ai/kernel": "0.2.22",
21
- "@jskit-ai/resource-runtime": "0.2.29"
18
+ "@jskit-ai/auth-core": "0.2.24",
19
+ "@jskit-ai/database-runtime": "0.1.272",
20
+ "@jskit-ai/kernel": "0.2.23",
21
+ "@jskit-ai/resource-runtime": "0.2.30"
22
22
  },
23
23
  "description": "Database-backed local auth storage backend for JSKIT local auth.",
24
24
  "jskit": {
@@ -31,7 +31,6 @@
31
31
  "auth.local.recovery"
32
32
  ],
33
33
  "requires": [
34
- "runtime.actions",
35
34
  "runtime.database",
36
35
  "runtime.resources"
37
36
  ]