@ahhaohho/auth-middleware 2.3.6 → 2.3.8
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/middleware/auth.js +2 -1
package/package.json
CHANGED
package/src/middleware/auth.js
CHANGED
|
@@ -177,7 +177,8 @@ async function authenticateHybrid(req, res, next) {
|
|
|
177
177
|
phoneNumber: refreshUser.phoneNumber
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
const
|
|
180
|
+
const accessExpiration = process.env.JWT_ACCESS_EXPIRATION || '1h';
|
|
181
|
+
const newAccessToken = await signToken(tokenData, { expiresIn: accessExpiration });
|
|
181
182
|
|
|
182
183
|
console.log('[@ahhaohho/auth-middleware] ✅ New access token generated for userId:', refreshUser.userId);
|
|
183
184
|
|