mbkauthe 1.0.24 → 1.0.25
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/lib/main.js +2 -2
- package/lib/validateSessionAndRole.js +1 -1
- package/package.json +1 -1
package/lib/main.js
CHANGED
|
@@ -90,7 +90,7 @@ const sessionConfig = {
|
|
|
90
90
|
saveUninitialized: false,
|
|
91
91
|
proxy: true, // Trust the reverse proxy
|
|
92
92
|
cookie: {
|
|
93
|
-
maxAge: mbkautheVar.COOKIE_EXPIRE_TIME,
|
|
93
|
+
maxAge: mbkautheVar.COOKIE_EXPIRE_TIME * 24 * 60 * 60 * 1000,
|
|
94
94
|
domain: mbkautheVar.IS_DEPLOYED === 'true' ? `.${mbkautheVar.DOMAIN}` : undefined,
|
|
95
95
|
httpOnly: true,
|
|
96
96
|
secure: mbkautheVar.IS_DEPLOYED === 'true' ? 'auto' : false, // 'auto' respects X-Forwarded-Proto
|
|
@@ -127,7 +127,7 @@ router.use(async (req, res, next) => {
|
|
|
127
127
|
|
|
128
128
|
// Set consistent cookie options for all cookies
|
|
129
129
|
const getCookieOptions = () => ({
|
|
130
|
-
maxAge: mbkautheVar.COOKIE_EXPIRE_TIME,
|
|
130
|
+
maxAge: mbkautheVar.COOKIE_EXPIRE_TIME * 24 * 60 * 60 * 1000,
|
|
131
131
|
domain: mbkautheVar.IS_DEPLOYED === 'true' ? `.${mbkautheVar.DOMAIN}` : undefined,
|
|
132
132
|
secure: mbkautheVar.IS_DEPLOYED === 'true' ? 'auto' : false,
|
|
133
133
|
sameSite: 'lax',
|
|
@@ -3,7 +3,7 @@ const mbkautheVar = JSON.parse(process.env.mbkautheVar);
|
|
|
3
3
|
|
|
4
4
|
// Get consistent cookie options
|
|
5
5
|
const getCookieOptions = () => ({
|
|
6
|
-
maxAge: mbkautheVar.COOKIE_EXPIRE_TIME,
|
|
6
|
+
maxAge: mbkautheVar.COOKIE_EXPIRE_TIME * 24 * 60 * 60 * 1000,
|
|
7
7
|
domain: mbkautheVar.IS_DEPLOYED === 'true' ? `.${mbkautheVar.DOMAIN}` : undefined,
|
|
8
8
|
secure: mbkautheVar.IS_DEPLOYED === 'true' ? 'auto' : false,
|
|
9
9
|
sameSite: 'lax',
|