@jcbuisson/express-x 1.5.29 → 1.5.30
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/package.json +1 -1
- package/src/common-hooks.mjs +2 -3
package/package.json
CHANGED
package/src/common-hooks.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import config from 'config'
|
|
3
3
|
import bcrypt from 'bcryptjs'
|
|
4
4
|
|
|
5
|
-
import { getConnectionDataItem
|
|
5
|
+
import { getConnectionDataItem } from './context.mjs'
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
// hash password of user record
|
|
@@ -42,8 +42,7 @@ export const isNotExpired = async (context) => {
|
|
|
42
42
|
const expireAt = new Date(expireAtISO)
|
|
43
43
|
const now = new Date()
|
|
44
44
|
if (now > expireAt) {
|
|
45
|
-
//
|
|
46
|
-
await resetConnection(context)
|
|
45
|
+
// DON'T CLEAR CONNECTION DATA, LOGOUT WILL NOT BE ABLE TO RETRIEVE SESSIONID
|
|
47
46
|
// throw exception
|
|
48
47
|
throw new Error('session expired')
|
|
49
48
|
}
|