@ahhaohho/auth-middleware 2.3.6 → 2.3.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahhaohho/auth-middleware",
3
- "version": "2.3.6",
3
+ "version": "2.3.7",
4
4
  "description": "Shared authentication and authorization middleware for ahhaohho microservices",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -177,7 +177,8 @@ async function authenticateHybrid(req, res, next) {
177
177
  phoneNumber: refreshUser.phoneNumber
178
178
  };
179
179
 
180
- const newAccessToken = await signToken(tokenData, { expiresIn: '1h' });
180
+ const accessExpiration = process.env.JWT_ACCESS_EXPIRATION || '24h';
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