@aooth/auth 0.1.3 → 0.1.4

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/dist/index.d.cts CHANGED
@@ -375,8 +375,16 @@ interface SmsSender {
375
375
  *
376
376
  * Recommended convention: include the token as `?wfs=<token>` so the
377
377
  * frontend can mount `<AsWfForm initialToken="...">` to resume the flow.
378
+ *
379
+ * Optional third `ctx` argument lets callers pass a stable per-recipient
380
+ * hint (e.g. `userId`). The invite outlet uses this so the SPA can fall
381
+ * through to a side route for the "already-redeemed" envelope when its
382
+ * second click hits a 410 from the wf state store. Recovery callers
383
+ * ignore the argument.
378
384
  */
379
- type BuildMagicLinkUrl = (kind: AuthEmailKind, token: string) => string;
385
+ type BuildMagicLinkUrl = (kind: AuthEmailKind, token: string, ctx?: {
386
+ userId?: string;
387
+ }) => string;
380
388
  /**
381
389
  * 32 bytes of CSPRNG entropy (256 bits) encoded as base64url — 43 chars,
382
390
  * URL-safe. Strong enough to survive short TTLs against online guessing.
package/dist/index.d.mts CHANGED
@@ -375,8 +375,16 @@ interface SmsSender {
375
375
  *
376
376
  * Recommended convention: include the token as `?wfs=<token>` so the
377
377
  * frontend can mount `<AsWfForm initialToken="...">` to resume the flow.
378
+ *
379
+ * Optional third `ctx` argument lets callers pass a stable per-recipient
380
+ * hint (e.g. `userId`). The invite outlet uses this so the SPA can fall
381
+ * through to a side route for the "already-redeemed" envelope when its
382
+ * second click hits a 410 from the wf state store. Recovery callers
383
+ * ignore the argument.
378
384
  */
379
- type BuildMagicLinkUrl = (kind: AuthEmailKind, token: string) => string;
385
+ type BuildMagicLinkUrl = (kind: AuthEmailKind, token: string, ctx?: {
386
+ userId?: string;
387
+ }) => string;
380
388
  /**
381
389
  * 32 bytes of CSPRNG entropy (256 bits) encoded as base64url — 43 chars,
382
390
  * URL-safe. Strong enough to survive short TTLs against online guessing.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aooth/auth",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Auth method layer for aoothjs (sessions, tokens, password reset, MFA primitives)",
5
5
  "keywords": [
6
6
  "aoothjs",
@@ -56,17 +56,17 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "jose": "^6.2.3",
59
- "@aooth/user": "0.1.3"
59
+ "@aooth/user": "0.1.4"
60
60
  },
61
61
  "devDependencies": {
62
- "@atscript/core": "^0.1.56",
63
- "@atscript/db": "^0.1.80",
64
- "@atscript/db-sql-tools": "^0.1.80",
65
- "@atscript/db-sqlite": "^0.1.80",
66
- "@atscript/typescript": "^0.1.56",
62
+ "@atscript/core": "^0.1.61",
63
+ "@atscript/db": "^0.1.87",
64
+ "@atscript/db-sql-tools": "^0.1.87",
65
+ "@atscript/db-sqlite": "^0.1.87",
66
+ "@atscript/typescript": "^0.1.61",
67
67
  "@types/better-sqlite3": "^7.6.13",
68
68
  "better-sqlite3": "^12.6.2",
69
- "unplugin-atscript": "^0.1.56"
69
+ "unplugin-atscript": "^0.1.61"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@atscript/db": ">=0.1.79"
@@ -80,6 +80,8 @@
80
80
  "build": "vp pack",
81
81
  "dev": "vp pack --watch",
82
82
  "test": "vp test",
83
- "check": "vp check"
83
+ "check": "vp check",
84
+ "gen:atscript": "asc",
85
+ "postinstall": "asc"
84
86
  }
85
87
  }