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.
- package/dist/auth-instance.js +5 -1
- package/package.json +1 -1
package/dist/auth-instance.js
CHANGED
|
@@ -10,7 +10,11 @@ export function createAuthInstance(deps) {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
async function readSession() {
|
|
13
|
-
|
|
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);
|