ideal-auth 1.3.1 → 1.3.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.
@@ -10,7 +10,11 @@ export function createAuthInstance(deps) {
10
10
  }
11
11
  }
12
12
  async function readSession() {
13
- validateSecret();
13
+ // Fail closed on reads — no secret means no session, not an error
14
+ if (!deps.secret || deps.secret.length < 32) {
15
+ cachedPayload = null;
16
+ return null;
17
+ }
14
18
  if (cachedPayload !== undefined)
15
19
  return cachedPayload;
16
20
  const raw = await deps.cookie.get(deps.cookieName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ideal-auth",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Auth primitives for the JS ecosystem. Zero framework dependencies.",
5
5
  "scripts": {
6
6
  "build": "tsc",