@basaltkit/auth 1.3.0 → 1.3.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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -779,8 +779,8 @@ var Auth = class {
779
779
  return true;
780
780
  }
781
781
  generateRecoveryCode() {
782
- const raw = randomBytes5(5).toString("hex");
783
- return `${raw.slice(0, 5)}-${raw.slice(5)}`;
782
+ const raw = randomBytes5(10).toString("hex");
783
+ return `${raw.slice(0, 5)}-${raw.slice(5, 10)}-${raw.slice(10, 15)}-${raw.slice(15)}`;
784
784
  }
785
785
  hashRecoveryCode(code) {
786
786
  return createHash3("sha256").update(code.replace(/-/g, "").toLowerCase()).digest("hex");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basaltkit/auth",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Authentication for Basalt: password hashing, JWT with refresh rotation and reuse detection, sessions, ready-made /auth routes and route guards.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,8 +14,8 @@
14
14
  "dist"
15
15
  ],
16
16
  "dependencies": {
17
- "@basaltkit/fastify": "^1.3.0",
18
- "@basaltkit/core": "^1.0.0"
17
+ "@basaltkit/core": "^1.0.0",
18
+ "@basaltkit/fastify": "^1.3.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "zod": "^3.24.0 || ^4.0.0"