@stacksjs/auth 0.70.36 → 0.70.42

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.
@@ -0,0 +1,16 @@
1
+ export type { AuthToken } from '@stacksjs/types';
2
+ /**
3
+ * `TokenManager` used to expose `createAccessToken` / `validateToken` /
4
+ * `rotateToken` / `revokeToken` static methods that hardcoded a 30-day
5
+ * `expires_at`, bypassed `config.auth.tokenExpiry`, and compared raw
6
+ * tokens against DB-stored hashes (i.e. broken). They had no callers —
7
+ * the real path lives on `Auth` (see authentication.ts) and respects
8
+ * the configured 1-hour expiry plus the refresh-token rotation
9
+ * landed for #1839. Removed entirely so the trap can't fire.
10
+ *
11
+ * `generateJWT` is the one piece worth keeping — `Auth.createTokenForUser`
12
+ * and `Auth.rotateToken` both use it to mint the JWT body.
13
+ */
14
+ export declare class TokenManager {
15
+ static generateJWT(userId: number, expiresInSeconds?: number): string;
16
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/auth",
3
3
  "type": "module",
4
- "version": "0.70.36",
4
+ "version": "0.70.42",
5
5
  "description": "A more simplistic way to authenticate.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "better-dx": "^0.2.12",
53
- "@stacksjs/error-handling": "0.70.30",
54
- "@stacksjs/router": "0.70.30"
53
+ "@stacksjs/error-handling": "^0.70.42",
54
+ "@stacksjs/router": "^0.70.42"
55
55
  }
56
56
  }