propro-utils 1.5.57 → 1.5.58

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": "propro-utils",
3
- "version": "1.5.57",
3
+ "version": "1.5.58",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -210,7 +210,8 @@ class AuthMiddleware {
210
210
  const refreshToken =
211
211
  req.cookies['x-refresh-token'] || req.headers['x-refresh-token'];
212
212
  if (!refreshToken) {
213
- return res.status(401).json({ error: 'No refresh token provided' });
213
+ clearAuthCookies(res);
214
+ return this.handleAuth(req, res);
214
215
  }
215
216
 
216
217
  try {