@nxgt/janus-drizzle 0.5.0 → 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/README.md +4 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -159,7 +159,10 @@ a code, in the order written; no codes are `null`, read as `[]`.
|
|
|
159
159
|
schema file exports.
|
|
160
160
|
- **Call `auth.collectExpired()` on a schedule.** PostgreSQL has no TTL, so
|
|
161
161
|
lapsed sessions stay in `sessions` until something deletes them. The
|
|
162
|
-
core still refuses them on every read.
|
|
162
|
+
core still refuses them on every read. **Lapsed tokens stay too**, and
|
|
163
|
+
`collectExpired()` does not delete them: `@nxgt/janus`'s sign-in throttle
|
|
164
|
+
adds a row per login tried and per 15-minute window — a login nobody holds
|
|
165
|
+
included — so schedule `delete from tokens where expires_at < now() - interval '1 hour';` beside it — `<schema>.tokens` when the tables have a schema of their own. `tokens` has no index on `expires_at`, so the delete scans the table: add `create index on tokens (expires_at)` in a migration of yours if it grows.
|
|
163
166
|
- **A unique violation on anything but a login is a `StoreFailure`, not
|
|
164
167
|
`LOGIN_TAKEN`.** Such a violation is an adapter bug. Reporting it as a taken
|
|
165
168
|
login would tell somebody their e-mail is in use when it is not.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/janus-drizzle",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "The PostgreSQL adapter for @nxgt/janus on Drizzle and @nxgt/drizzle: users, sessions, one-time tokens and permission tuples",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@electric-sql/pglite": "0.5.8",
|
|
53
53
|
"@nxgt/drizzle": "0.6.1",
|
|
54
|
-
"@nxgt/janus": "^0.
|
|
54
|
+
"@nxgt/janus": "^0.14.0",
|
|
55
55
|
"@types/bun": "^1.4.2",
|
|
56
56
|
"@types/pg": "^8.23.1",
|
|
57
57
|
"drizzle-kit": "1.0.0-rc.4",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@nxgt/drizzle": ">=0.6.1 <1",
|
|
65
|
-
"@nxgt/janus": "^0.
|
|
65
|
+
"@nxgt/janus": "^0.14.0",
|
|
66
66
|
"drizzle-orm": ">=1.0.0-rc.4 <2",
|
|
67
67
|
"typescript": "^6.0.3"
|
|
68
68
|
}
|