mikser-io-auth 0.5.1 → 0.5.2
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/lib/grants.js +15 -1
- package/package.json +1 -1
package/lib/grants.js
CHANGED
|
@@ -49,7 +49,21 @@ registerSchema('auth', `
|
|
|
49
49
|
created_at INTEGER NOT NULL,
|
|
50
50
|
last_used_at INTEGER
|
|
51
51
|
);
|
|
52
|
-
|
|
52
|
+
`, {
|
|
53
|
+
// Durable: these tables are not derived from anything on disk.
|
|
54
|
+
//
|
|
55
|
+
// The engine wipes its database whenever the schema version or the
|
|
56
|
+
// config checksum changes — an upgrade, or any deploy that edits
|
|
57
|
+
// mikser.config.js. That is correct for a cache the files can rebuild,
|
|
58
|
+
// and wrong here: a registered OAuth client and its refresh token exist
|
|
59
|
+
// only because a human completed a sign-in once. Losing them logs every
|
|
60
|
+
// connected agent out, and the operator's first sign of it is being
|
|
61
|
+
// asked to authorize again after an unrelated deploy.
|
|
62
|
+
//
|
|
63
|
+
// Codes are 60s and swept anyway; they ride along because they share the
|
|
64
|
+
// schema, and a stale one is rejected on expiry rather than trusted.
|
|
65
|
+
durable: true,
|
|
66
|
+
})
|
|
53
67
|
|
|
54
68
|
const db = () => useDatabase().handle
|
|
55
69
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mikser-io-auth",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Authentication for mikser-io: an OAuth 2.1 authorization server (self-registering clients, authorization code + PKCE, refresh rotation) and HTTP Basic / JWT verifiers over Apache-format htpasswd and htgroup files in the working folder. Implements the ADR-0012 verifier contract, so it plugs in wherever a static token does — api, mcp, forms.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|