knowless 1.1.0 → 1.1.1

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/CHANGELOG.md CHANGED
@@ -12,6 +12,12 @@ Versioning is [SemVer](https://semver.org/).
12
12
  auth+mail layer. ~1,150 LOC of bespoke auth/mail code removed,
13
13
  ~35 LOC of knowless wiring added (~33× reduction). Drove audit
14
14
  findings AF-7 → AF-17 across v0.1.5–v0.1.10.
15
+ - **2026-05-02 — Three adopters in production.** plato (Mode B,
16
+ forum) and gitdone (Mode A, multi-party email workflows) joined
17
+ addypin (Mode A, location sharing). gitdone's pre-merge review
18
+ surfaced the "wrong-shape integration" failure mode (parallel
19
+ tokens table + manual session minting alongside knowless instead
20
+ of `auth.startLogin`). Patched docs in v1.1.1; no API change.
15
21
 
16
22
  ## [Unreleased]
17
23
 
@@ -24,6 +30,32 @@ v1.0.0 are:
24
30
  - Documentation corrections
25
31
  - Helper exports that pull existing mechanism back into the library
26
32
 
33
+ ## [1.1.1] — 2026-05-02
34
+
35
+ Documentation-only release. Adds the wrong-shape-integration
36
+ anti-pattern callout that gitdone's pre-merge review surfaced, and
37
+ records plato + gitdone as the second and third production adopters.
38
+ No code changes.
39
+
40
+ ### Documented
41
+
42
+ - `README.md` — replaced "Sibling projects" with an "Adopters"
43
+ section explicitly listing addypin (Mode A), plato (Mode B), and
44
+ gitdone (Mode A) with a pointer that addypin and gitdone are the
45
+ Mode A worked references.
46
+ - `GUIDE.md` § "Two adoption modes" — added an anti-pattern callout
47
+ at the top: if you're considering writing pending rows to a
48
+ custom tokens table or minting your own confirmation links, that's
49
+ Mode A and `auth.startLogin({ subjectOverride, bodyOverride })`
50
+ already does it. Includes a side-by-side wrong-shape vs Mode A
51
+ sketch. Surfaced by gitdone's pre-merge review where a parallel
52
+ activation system was built before the existing Mode A flow was
53
+ noticed.
54
+ - `GUIDE.md` Mode A/B sub-headings — appended the API entrypoint
55
+ (`auth.startLogin` for Mode A, `auth.login` for Mode B) so the
56
+ use-case leads and `startLogin` doesn't read as "login button
57
+ click."
58
+
27
59
  ## [1.1.0] — 2026-05-02
28
60
 
29
61
  Mailer-contract clarification release. Pulls FR-6 sham-routing
package/GUIDE.md CHANGED
@@ -286,7 +286,31 @@ both out of the box; pick per-action, not per-app — they coexist.
286
286
  The Mode A/B labels are used here and in the CHANGELOG so
287
287
  discussions across the docs stay unambiguous.
288
288
 
289
- **Mode B "sign in, then do the thing" (register-first, the default).**
289
+ > **Stop before you build a parallel activation system.** If
290
+ > you're considering writing pending rows to a custom tokens table,
291
+ > minting your own confirmation links, or calling into the sessions
292
+ > table directly to mark an account "activated by email" — that is
293
+ > Mode A, and it's already in this library. Use
294
+ > `auth.startLogin({ email, subjectOverride, bodyOverride })` and
295
+ > promote your pending resource in the callback handler. The
296
+ > wrong-shape integration is what every adopter has tried first; the
297
+ > right shape is the worked example below.
298
+
299
+ The wrong shape vs Mode A, side by side:
300
+
301
+ ```
302
+ WRONG SHAPE MODE A (use auth.startLogin)
303
+ ───────────────────────────── ─────────────────────────────
304
+ your_tokens table (none — knowless owns the token)
305
+ your custom email composer subjectOverride + bodyOverride
306
+ your /confirm/:token handler auth.callback (already mounted)
307
+ manual session insert handled by callback
308
+ your duplicate rate-limit code knowless rate-limit applies
309
+ sham-work + timing equivalence
310
+ preserved automatically
311
+ ```
312
+
313
+ **Mode B — "sign in, then do the thing" (register-first, the default, `auth.login`).**
290
314
  User must log in before performing the action. Wire `auth.login` /
291
315
  `auth.callback` as above; gate your action with
292
316
  `auth.handleFromRequest(req)`. Use when the action requires a session
@@ -301,7 +325,7 @@ app.post('/api/comments', (req, res) => {
301
325
  });
302
326
  ```
303
327
 
304
- **Mode A — "do the thing, confirm by email" (use-first, claim-later).**
328
+ **Mode A — "do the thing, confirm by email" (use-first, claim-later, `auth.startLogin`).**
305
329
  User performs the action without logging in; you capture their email
306
330
  and trigger a magic link. Clicking it opens a session and your
307
331
  callback handler "promotes" the deferred resource. Use for "drop a
package/README.md CHANGED
@@ -148,12 +148,21 @@ rate-limits) belong above the library — patterns in
148
148
  Full detail in [`knowless.context.md`](knowless.context.md) §
149
149
  "Threat model summary."
150
150
 
151
- ## Sibling projects
151
+ ## Adopters
152
152
 
153
- - [`addypin`](https://github.com/hamr0/addypin) location sharing,
154
- first knowless adopter
155
- - [`gitdone`](https://github.com/hamr0/gitdone) — verified email
156
- actions via DKIM/SPF inbound
153
+ Production users of knowless, in adoption order:
154
+
155
+ - [`addypin`](https://github.com/hamr0/addypin) — pin-drop location
156
+ sharing. First knowless adopter; Mode A (drop-pin-then-confirm).
157
+ - [`plato`](https://github.com/hamr0/plato) — forum (Reddit-shaped,
158
+ one fingerprint per site). Mode B (sign-in-then-do).
159
+ - [`gitdone`](https://github.com/hamr0/gitdone) — multi-party email
160
+ workflows verified via DKIM/SPF inbound. Mode A
161
+ (start-workflow-then-confirm).
162
+
163
+ If you're picking knowless up: the addypin and gitdone callsites are
164
+ both Mode A and good worked references for the use-first / claim-later
165
+ shape.
157
166
 
158
167
  ## License
159
168
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knowless",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Small, opinionated, full-stack passwordless auth for Node.js services that don't need to email their users for anything but the sign-in link.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",