@stacksjs/auth 0.70.179 → 0.70.181
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/cookie-auth.js +4 -2
- package/package.json +3 -3
package/dist/cookie-auth.js
CHANGED
|
@@ -4,8 +4,10 @@ function cookieName(options) {
|
|
|
4
4
|
return options?.name ?? config.auth?.cookie?.name ?? "stacks_auth";
|
|
5
5
|
}
|
|
6
6
|
function defaultMaxAge() {
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const milliseconds = Number(config.auth?.tokenExpiry ?? 3600000);
|
|
8
|
+
if (!Number.isFinite(milliseconds) || milliseconds <= 0)
|
|
9
|
+
return 3600;
|
|
10
|
+
return Math.max(60, Math.round(milliseconds / 1000));
|
|
9
11
|
}
|
|
10
12
|
function isLocal() {
|
|
11
13
|
const environment = String(config.app?.env ?? process.env.APP_ENV ?? "");
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/auth",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.70.
|
|
5
|
+
"version": "0.70.181",
|
|
6
6
|
"description": "A more simplistic way to authenticate.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"better-dx": "^0.2.17",
|
|
59
|
-
"@stacksjs/error-handling": "0.70.
|
|
60
|
-
"@stacksjs/router": "0.70.
|
|
59
|
+
"@stacksjs/error-handling": "0.70.181",
|
|
60
|
+
"@stacksjs/router": "0.70.181"
|
|
61
61
|
}
|
|
62
62
|
}
|